Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Compose key -- multiple output characters

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
Caitlin
Posts: 329
Joined: 2012-05-24 07:32
Has thanked: 3 times
Been thanked: 2 times

Compose key -- multiple output characters

#1 Post by Caitlin »

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

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Compose key -- multiple output characters

#2 Post by Head_on_a_Stick »

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?
deadbang

Caitlin
Posts: 329
Joined: 2012-05-24 07:32
Has thanked: 3 times
Been thanked: 2 times

Re: Compose key -- multiple output characters

#3 Post by Caitlin »

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: 329
Joined: 2012-05-24 07:32
Has thanked: 3 times
Been thanked: 2 times

Re: Compose key -- multiple output characters

#4 Post by Caitlin »

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: 329
Joined: 2012-05-24 07:32
Has thanked: 3 times
Been thanked: 2 times

Re: Compose key -- multiple output characters

#5 Post by Caitlin »

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


Post Reply