Branch
Hash :
230b6a6a
Author :
Date :
2025-05-06T14:35:26
Fix key type map entry with unbound vmod not ignored Currently we only ignore key type map entries with non-zero mods and with a zero modifier mask. However, the XKB protocol states ([source]): > Map entries which specify unbound virtual modifiers are not considered. So we currently handle `map[Unbound]` key type map entries (all modifiers unbound) but not `map[Bound+Unbound]` entries (mix of bound and unbound modifiers). Fixed by properly checking unbound modifiers on each key type map entry. This also fixes a test that was accidentally passing. [source]: https://www.x.org/releases/X11R7.7/doc/kbproto/xkbproto.html#:~:text=Map%20entries%20which%20specify%20unbound%20virtual%20modifiers,not%20considered
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
default partial alphanumeric_keys
xkb_symbols "modifiers" {
name[Group1] = "Test latching behavior";
virtual_modifiers Alt=Mod1, LevelThree;
key <AE01> { [ 1, exclam, onesuperior, exclamdown, plus ], type[Group1]="CTRL+ALT"};
key <AD01> { [ q, Q ], type[Group1] = "ALPHABETIC" };
key <LFSH> {
symbols[Group1] = [ Shift_L ],
actions[Group1] = [ LatchMods(modifiers=Shift,latchToLock=true,clearLocks=true) ]
};
key <RTSH> {
symbols[Group1] = [ Shift_R ],
actions[Group1] = [ LatchMods(modifiers=Shift,latchToLock=false,clearLocks=false) ]
};
key <LCTL> {
symbols[Group1] = [ Control_L ],
actions[Group1] = [ LatchMods(modifiers=Control) ]
};
key <LALT> {
type[Group1] = "ONE_LEVEL",
symbols[Group1] = [ Alt_L ],
actions[Group1] = [ LatchMods(modifiers=Alt) ]
};
key <RALT> {
type[Group1] = "ONE_LEVEL",
symbols[Group1] = [ ISO_Level3_Latch ],
actions[Group1] = [ LatchMods(modifiers=LevelThree,latchToLock=true,clearLocks=true) ]
};
key <MENU> {
type[Group1] = "ONE_LEVEL",
symbols[Group1] = [ ISO_Level3_Latch ],
actions[Group1] = [ LatchMods(modifiers=LevelThree,latchToLock=false,clearLocks=false) ]
};
key <FK01> { [XF86_Switch_VT_1], type[Group1] = "ONE_LEVEL" };
key <FK02> { [ISO_Group_Shift], type[Group1] = "ONE_LEVEL" };
key <LSGT> { [ ISO_Level3_Lock ], type[Group1] = "ONE_LEVEL" };
key <CAPS> { [ ISO_Group_Latch ] };
};