1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | partial xkb_types "complete" { type "FOUR_LEVEL_RALT" { modifiers= Shift+LevelThree; map[Shift]= Level2; map[LevelThree]= Level3; map[Shift+LevelThree]= Level4; level_name[Level1]= "Base"; level_name[Level2]= "Shift"; level_name[Level3]= "Level3"; level_name[Level4]= "Shift Level3"; }; }; partial xkb_symbols "pc+de(nodeadkeys)+us:2+de:3+inet(evdev)" { include "pc+de(nodeadkeys)+us:2+de:3+inet(evdev)" key <AC01> { type[group1]= "FOUR_LEVEL_ALPHABETIC", type[group2]= "FOUR_LEVEL_RALT", type[group3]= "FOUR_LEVEL_ALPHABETIC", symbols[Group1]= [ a, A, ae, AE ], symbols[Group2]= [ a, A, adiaeresis, Adiaeresis ], symbols[Group3]= [ a, A, ae, AE ] }; key <AC02> { type[group1]= "FOUR_LEVEL_SEMIALPHABETIC", type[group2]= "FOUR_LEVEL_RALT", type[group3]= "FOUR_LEVEL_SEMIALPHABETIC", symbols[Group1]= [ s, S, U017F, U1E9E ], symbols[Group2]= [ s, S, ssharp, ssharp ], symbols[Group3]= [ s, S, U017F, U1E9E ] }; key <AD03> { type[group1]= "FOUR_LEVEL_SEMIALPHABETIC", type[group2]= "FOUR_LEVEL_RALT", type[group3]= "FOUR_LEVEL_SEMIALPHABETIC", symbols[Group1]= [ e, E, EuroSign, EuroSign ], symbols[Group2]= [ e, E, EuroSign, EuroSign ], symbols[Group3]= [ e, E, EuroSign, EuroSign ] }; key <AD07> { type[group1]= "FOUR_LEVEL_SEMIALPHABETIC", type[group2]= "FOUR_LEVEL_RALT", type[group3]= "FOUR_LEVEL_SEMIALPHABETIC", symbols[Group1]= [ u, U, downarrow, uparrow ], symbols[Group2]= [ u, U, udiaeresis, Udiaeresis ], symbols[Group3]= [ u, U, downarrow, uparrow ] }; key <AD09> { type[group1]= "FOUR_LEVEL_ALPHABETIC", type[group2]= "FOUR_LEVEL_RALT", type[group3]= "FOUR_LEVEL_ALPHABETIC", symbols[Group1]= [ o, O, oslash, Oslash ], symbols[Group2]= [ o, O, odiaeresis, Odiaeresis ], symbols[Group3]= [ o, O, oslash, Oslash ] }; }; |
1 2 3 | #!/bin/sh xkbcomp ~/.config/xkb-keyboard/cweiske-kinesis-full.xkb $DISPLAY |
only strange characters were shown on the shell when pressing mapped key combos (altr+a, altr+s etc), see screenshot.
When using "read" on cli, I got:
^[ä ^[ß
In emacs, I got the following message:
M-ä is undefined
So somehow some escape sequence was inserted in addition to the character itself.
The final solution was to remove this line:
modifier_map Mod1 { <RALT> };
The keyboard map mapped the key combo (e.g. altr+a) to the correct character (ä), but xkb also sent the modifier key Mod1, which was interpreted by the shell and emacs as some control key.
[tab]>[caps] [caps]>[tab] [Z]>[Y] [Y]>[Z] [rwin]>[ralt] [kp-rwin]>[kp-ralt] {rctrl}{f8}>{-lctrl}{t}{+lctrl} {lctrl}{f8}>{-lctrl}{t}{+lctrl} {rctrl}{t}>{-lshift}{4}{+lshift}{t}{h}{i}{s}{hyphen}{-lshift}{.}{+lshift} {lctrl}{t}>{-lshift}{4}{+lshift}{t}{h}{i}{s}{hyphen}{-lshift}{.}{+lshift} {rctrl}{bspace}>{-lalt}{tab}{+lalt} {lctrl}{bspace}>{-lalt}{tab}{+lalt} {rctrl}{=}>{space}{=}{-lshift}{.}{+lshift}{space} {lctrl}{=}>{space}{=}{-lshift}{.}{+lshift}{space} {rctrl}{hyphen}>{hyphen}{-lshift}{.}{+lshift} {lctrl}{hyphen}>{hyphen}{-lshift}{.}{+lshift}
startup_file=qwerty.txt key_click_tone=OFF toggle_tone=ON macro_disable=OFF macro_speed=9 status_play_speed=4 power_user=true program_key_lock=OFF