Compose key -- multiple output characters

If none of the more specific forums is the right place to ask

Compose key -- multiple output characters

Postby Caitlin » 2019-01-07 18:01

I've had good success with setting up the (nearly useless) Menu key as a Compose key, to have access to characters that are not on my keyboard, that I use fairly often. Now I want to take it to the next level -- typing the Compose key, then another key, and have it output a short string -- like " /* " or ";}". I realize the Compose mechanism was never intended to do this. I tried to trick it into doing so anyway; but all I did was break it.

Perhaps I could set up a Compose sequence to output a Hebrew or Armenian character (which I don't use) and have another utility convert it into the string I want. (Name of that utility?)

Here's what I did: I replaced the table in /usr/share/X11/locale/en-US.UTF_8/Compose with one of my own -- so I could just include the characters I would actually use (such as "ß") with easier-to-remember mnemonics (<Multi_key> <b> instead of <Multi_key> <s> <s>); then I entered "setxkbmap -option 'compose:menu'" in a terminal. That much worked like a charm.

Then I tried to extend it so one Compose sequence would output more than a single character -- for example, <Multi_key> <]> to generate ";}". I tried putting more than one output character in a single line of the table, and putting multiple rows there for the same input key sequence, with only one character generated per row, hoping it would go through each row in turn and throw them all. No such luck. All I accomplished was the Compose mechanism stopped working altogether.

Suggestions welcome.

I have Debian 9.6 with the MATE desktop.

Caitlin
Caitlin
 
Posts: 269
Joined: 2012-05-24 07:32

Re: Compose key -- multiple output characters

Postby Head_on_a_Stick » 2019-01-07 18:12

Caitlin wrote:Suggestions welcome

If I want to type unusual glyphs I just enter the unicode directly (<Ctrl>+<Shift>+u followed by the unicode), would that work for you?
"French riots get results! U lot are instagram zzzombies" — graffiti over Euston underpass
User avatar
Head_on_a_Stick
 
Posts: 8593
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Compose key -- multiple output characters

Postby Caitlin » 2019-01-07 20:07

Head_on_a_Stick wrote:
Caitlin wrote:Suggestions welcome

If I want to type unusual glyphs I just enter the unicode directly (<Ctrl>+<Shift>+u followed by the unicode), would that work for you?

No, because that's not what I'm trying to do. Or more accurately, it's what I already AM doing with the Compose key. See the OP.

What I'm trying to do now is compose MULTIPLE glyphs with one composition. For example, <Multi_key> <]> to output ";}". Yes, I know I can just type ";" and then "}" but I have my reasons for wanting to do it that way.

Caitlin
Caitlin
 
Posts: 269
Joined: 2012-05-24 07:32

Re: Compose key -- multiple output characters

Postby Caitlin » 2019-01-19 08:52

Well, I finally built my own Compose table AND installed AutoKey. Specifically, I press Menu (that useless key next to right-Ctrl) then "]" which outputs "ė" (e with dot above). Then I want AutoKey to catch that and output ";}". But it doesn't work. I suspect Compose needs to catch the Menu "]" BEFORE AutoKey grabs it, but AutoKey is running too soon.

What happens is that Compose DOES output the "ė", but that's what I see instead of ";}". When I set a second abbreviation to trigger the AutoKey replacement, it works. Specifically, I can press "`" and AutoKey will throw ";}".

Anyone have any ideas? How do Compose and AutoKey hook into the keyboard, anyway?

I'm using Debian 9.6 with the MATE desktop. I have replaced the standard Compose table with my own, which works for most of what I want to do. The AutoKey I've installed is the GTK one.

Caitlin
Caitlin
 
Posts: 269
Joined: 2012-05-24 07:32

Re: Compose key -- multiple output characters

Postby Caitlin » 2019-01-22 14:58

Well, due to the lack of response and the fact that I've tried several things, I've concluded that it's just not possible.

I was hoping that Compose would throw a character such as e-with-a-dot-over-it and then AutoKey would catch that and throw a longer phrase. But I just can't get them to run in series like that. One thing I tried was activating Compose then AutoKey (didn't work) and then activating AutoKey then Compose (didn't work either).

But if I can't get them to run in series, maybe I can get them to run in parallel. As in, some replacements are processed by AutoKey and some are processed by Compose -- but nothing is processed by both. It seems to be working so far.

Caitlin
Caitlin
 
Posts: 269
Joined: 2012-05-24 07:32


Return to General Questions

Who is online

Users browsing this forum: Head_on_a_Stick, peter_irich and 9 guests

fashionable