• You are not logged in.

    AltGr-[\] combinations on Linux

    • Started by cousteau
    • 2 Replies:
    • Reputation: 0
    • Registered: 26-Dec-2017
    • Posts: 1

    Hi there!

    I have joined this forum because, as a proud Linux user, I couldn't stand all the mentions of "only MS Windows/Mac" in https://colemak.com/Multilingual, regarding the "magic combining special character generator" (AltGr-[­\]).  Well, I have some good news for Linux users: it can be done!

    Here is the xkb source code I came up with.
    Basically it uses an extra modifier (ISO_Level5) which is similar to AltGr and enables a 5th level of characters (this is done for example in the Canadian Multilingual layout, which uses AltGr as Level3 switch and Control_R as Level5 switch).
    Rather than using an ISO_Level5_Shift, which requires holding the key while pressing the other, it is possible to use an ISO_Level5_Latch, which behaves like a dead key that will affect the next key to be pressed.  Yay, just what was needed!

    I have tested it and it seems to work.  But be warned, it is kind of buggy:

    • It requires following a strict <AltGr down> <[­\] down> <[­\] up> <AltGr up> sequence; if you release AltGr before [­\] it doesn't work.  Weird.

    • For some reason, AltGr-[­\] + Shift-[­\] leaves this Level5 switch on, so the following character will be affected as well unless you press AltGr-[­\] again to toggle it off.  This makes the generation of ¦ extra hard, so I have added it as AltGr-Shift-[­\] as a workaround.

    Personally, though, I think that this "magical modifier dead key" complicates things and that a better solution would be to get rid of it and just use AltGr and AltGr-Shift everywhere.  I have thought of an alternative AltGr layout that does this, but I'll leave that for another post.

    The layout also includes the map from Caps Lock to Backspace.  (It auto-repeats out of the box; I read somewhere that it didn't but I tried it and it does for me.)

    As a bonus feature, I added a narrow non-breaking space, which is the thousand and unit separator recommended by the SI bureau and the standard in some languages such as Spanish (compare the excessively separated 10 000 000 with the awesomely well-kerned 10000000, which you can't see in this forum because the software it runs on thinks it's OK to delete U+202F characters >:( ), and also required in French to separate punctuation, I think.  It's in AltGr-[­\] + Shift-space.

    Additionally, I mapped the extra ISO key some keyboards have between shift and Z as an extra AltGr.  Honestly, I didn't see myself typing ñ by pressing AltGr with my thumb and N with my index, it feels kind of awkward.  So why not add a second AltGr for the other hand if available?

    Finally, I want to add that AltGr-[­.] [­L] works out of the box for me (produces an Ŀ) so the "only MS Windows/Mac" label may be removed.  (I don't think anyone uses this character though; rather, they use two regular L's with a "·" in between, which is mapped to Shift-[­3] in Spanish keyboards.)

    Cheers!

    Last edited by cousteau (26-Dec-2017 20:17:38)
    Offline
    • 0
    • Reputation: 10
    • From: Belgium
    • Registered: 26-Feb-2008
    • Posts: 426

    Hi,

    I mapped AltrGr-\ to a regular deadkey and use XCompose sequences instead of an extra layout layer, it's simpler to maintain and to add extra combinations:
    https://forum.colemak.com/topic/788-col … -linuxx11/

    Offline
    • 0
    • Reputation: 90
    • From: Oslo, Norway
    • Registered: 13-Dec-2006
    • Posts: 4,497

    Also, the dead key solution doesn't mess up Extend. My Extend implementation also uses level5. I feel it's way more logical to use Ghen's method since AltGr+\ is indeed a dead key.

    Another matter entirely is that those mappings aren't all that good IMNSHO. I much prefer my Colemak[eD] mappings, dead keys and all! Shai himself said that he didn't use a whole lot of time and effort on those mapping layers, and they seem lacking and clunky to me.

    But at any rate, it's nice to see people caring about Colemak! :-) Also, the Cousteau solution is self-contained, only requiring the symbols entry and no fiddling to implement the dead key change. That's nice in some cases! I wouldn't mind having that solution as the standard Colemak for xkb – but I'd prefer mine of course! ;-)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0