0

I'm trying to improve my keyboard layout using xkb and it worked great using the default 4 levels (or should I say 2 levels? I don't really know the terms..

And when I'm at opening a parenthesis, I found xkb very poorly documented (or I don't know how to search).. Some speak of levels, some of groups, some define levels as shift being the first, AltGr the second and others consider the base character being the first then increamenting each combination. I mean there are many inconsistencies..)

Anyway, here is the default 4 "combinations" with the key M in some keyboards:

// Pressing   <M> <Shift+M> <AltGr+M> <Shift+AltGr+M>
key <AB07> { [ m ,    M    ,    mu   ,      mu       ] }; // m M µ µ

Is it possible to add into the mix others modifiers?

For example with one extra modifier for example the R Ctrl I can have 6 combinations:

// Pressing   <M> <Shift+M> <AltGr+M> <AltGr+Shift+M> <RCtrl+M> <RCtrl+Shift+M>
key <AB07> { [ m ,    M    ,    mu   ,    mu         , comma  , semicolon] };// m M µ µ , ;

Or even 8 combinations with all the three modifiers..
And in fact it seems that there is already an 8 level mapping in some symbol files with the keyword EIGHT_LEVEL

However I'm not looking to get 42 combinations for one key..

Rather I just want to avoid awkward combination for my fingers and for that I prefer to still have only limited combinations with "direct access", like so:

// Pressing   <M> <Shift+M> <AltGr+M>  <RCtrl+M>  <RWin>+M
key <AB07> { [ m ,    M    ,  comma  , semicolon ,    µ   ] }; // m M , ; µ

I would also want to map other characters or even moves (arrows, home/end, page up/down) with other unused modifiers (capslock, numlock)

How can I do this ?

Thank you very much.

  • 8-level mappings use 2 level-shifting keys: ISO_Level3_Shift and ISO_Level5_Shift. various combinations with of these with Shift (aka level2-shift) give you access to all 8 symbols in the mapping. see the various lv5: options in man xkeyboard-config. you may also be interested in this question and the solution presented: unix.stackexchange.com/questions/302163/… – quixotic Jun 6 '18 at 12:27
  • Thanks.. Do you know if it is possible to increase the levels? I mean I only intersted to combination that don't chord a lot (ie. two kestrokes - the nth level modifier + the key)? – SanjiBukai Jun 11 '18 at 2:52
  • if you're asking how to add shift-keys for levels 4, 6, 7, and 8, the previous link touches on those. (the answer demonstrates latch rather than shift, but a shift implementation would be similar.) ... if you're asking about a level9 and higher, see this answer: unix.stackexchange.com/a/411887/222377 – quixotic Jun 14 '18 at 20:47
  • Thanks. So if I wanted to have only the <levelX>+key combinations (without chording), I should define the level 3, level 5, level 9, level 17, level 33 and so on (level 2ⁿ+1)? Is this even possible? If so (it'll weird though) I probably should put NoSymbol to all unwanted chording combinations? – SanjiBukai Jun 15 '18 at 10:23
  • as pointed out in the second link, level9 is not a current possibility without rewriting some code. if you want shift/lock/latch keys for level4, level6, level7, and level8 (so you can reach those levels with one shift/lock/latch instead of 2-3, which i assume is what "without chording" is trying to achieve), the first link is what you want. – quixotic Jun 15 '18 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.