diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2021-10-25 13:03:17 +1000 |
---|---|---|
committer | Sergey Udaltsov <sergey.udaltsov@gmail.com> | 2021-11-12 12:17:37 +0000 |
commit | 29f2cd1eecc540480fcaf4580bcdd78283734e31 (patch) | |
tree | a56200f17e4a0ddb95c6a7ec129aeb20ca8079d7 | |
parent | 4fc49ffecd4d79be9211aaf852167734bbf59f1d (diff) |
rules: add custom per-group mapping for level3(ralt_alt)
ralt_alt is a special mapping: "the right Alt key never chooses the
third level." To achieve this, the key is defined for all four possible
groups.
This causes an issue with the libxkbcommon parser which extends the
keymap to be 4 groups wide thanks to this key, see
https://github.com/xkbcommon/libxkbcommon/issues/262
That is arguably a bug in libxkbcommon whose behavior differs from
xkbcomp - xkbcomp clamps to the number of layouts.
But defining the key this way is wrong, no other keys is defined for
multiple groups on that purpose. The correct way to achieve this
functionality is to define the symbols for group1 only and then adjust
the rules so they automatically apply to all groups currently present.
-rw-r--r-- | rules/0036-lo_s.part | 1 | ||||
-rw-r--r-- | rules/0037-l1o_s.part | 1 | ||||
-rw-r--r-- | rules/0038-l2o_s.part | 1 | ||||
-rw-r--r-- | rules/0039-l3o_s.part | 1 | ||||
-rw-r--r-- | rules/0040-l4o_s.part | 1 | ||||
-rw-r--r-- | rules/0042-o_s.part | 3 | ||||
-rw-r--r-- | symbols/level3 | 8 |
7 files changed, 7 insertions, 9 deletions
diff --git a/rules/0036-lo_s.part b/rules/0036-lo_s.part index c26dbc0d..4b5a0110 100644 --- a/rules/0036-lo_s.part +++ b/rules/0036-lo_s.part @@ -1,4 +1,5 @@ ! layout option = symbols $threelevellayouts grp:alts_toggle = +level3(ralt_switch_for_alts_toggle) + * lv3:ralt_alt = +level3(ralt_alt) * misc:typo = +typo(base) * misc:apl = +apl(level3) diff --git a/rules/0037-l1o_s.part b/rules/0037-l1o_s.part index 202fd6e2..03e7db6e 100644 --- a/rules/0037-l1o_s.part +++ b/rules/0037-l1o_s.part @@ -1,4 +1,5 @@ ! layout[1] option = symbols $threelevellayouts grp:alts_toggle = +level3(ralt_switch_for_alts_toggle):1 + * lv3:ralt_alt = +level3(ralt_alt):1 * misc:typo = +typo(base):1 * misc:apl = +apl(level3):1 diff --git a/rules/0038-l2o_s.part b/rules/0038-l2o_s.part index 17df2818..cd7d0fb1 100644 --- a/rules/0038-l2o_s.part +++ b/rules/0038-l2o_s.part @@ -1,4 +1,5 @@ ! layout[2] option = symbols $threelevellayouts grp:alts_toggle = +level3(ralt_switch_for_alts_toggle):2 + * lv3:ralt_alt = +level3(ralt_alt):2 * misc:typo = +typo(base):2 * misc:apl = +apl(level3):2 diff --git a/rules/0039-l3o_s.part b/rules/0039-l3o_s.part index 81c35354..0414b9f8 100644 --- a/rules/0039-l3o_s.part +++ b/rules/0039-l3o_s.part @@ -1,4 +1,5 @@ ! layout[3] option = symbols $threelevellayouts grp:alts_toggle = +level3(ralt_switch_for_alts_toggle):3 + * lv3:ralt_alt = +level3(ralt_alt):3 * misc:typo = +typo(base):3 * misc:apl = +apl(level3):3 diff --git a/rules/0040-l4o_s.part b/rules/0040-l4o_s.part index 9e64b4a5..53738a5f 100644 --- a/rules/0040-l4o_s.part +++ b/rules/0040-l4o_s.part @@ -1,4 +1,5 @@ ! layout[4] option = symbols $threelevellayouts grp:alts_toggle = +level3(ralt_switch_for_alts_toggle):4 + * lv3:ralt_alt = +level3(ralt_alt):4 * misc:typo = +typo(base):4 * misc:apl = +apl(level3):4 diff --git a/rules/0042-o_s.part b/rules/0042-o_s.part index 48ed50d6..647cf76d 100644 --- a/rules/0042-o_s.part +++ b/rules/0042-o_s.part @@ -60,7 +60,6 @@ lv3:switch = +level3(switch) lv3:ralt_switch = +level3(ralt_switch) lv3:ralt_switch_multikey = +level3(ralt_switch_multikey) - lv3:ralt_alt = +level3(ralt_alt) lv3:lalt_switch = +level3(lalt_switch) lv3:alt_switch = +level3(alt_switch) lv3:menu_switch = +level3(menu_switch) @@ -127,7 +126,7 @@ keypad:future = +keypad(future) keypad:future_wang = +keypad(future_wang) keypad:hex = +keypad(ops)+keypad(hex) - keypad:atm = +keypad(ops)+keypad(hex)+keypad(atm) + keypad:atm = +keypad(ops)+keypad(hex)+keypad(atm) nbsp:none = +nbsp(none) nbsp:level2 = +nbsp(level2) nbsp:level3 = +nbsp(level3) diff --git a/symbols/level3 b/symbols/level3 index 00427435..0b3f9c54 100644 --- a/symbols/level3 +++ b/symbols/level3 @@ -30,13 +30,7 @@ partial modifier_keys xkb_symbols "ralt_alt" { key <RALT> { type[Group1]="TWO_LEVEL", - type[Group2]="TWO_LEVEL", - type[Group3]="TWO_LEVEL", - type[Group4]="TWO_LEVEL", - symbols[Group1] = [ Alt_R, Meta_R ], - symbols[Group2] = [ Alt_R, Meta_R ], - symbols[Group3] = [ Alt_R, Meta_R ], - symbols[Group4] = [ Alt_R, Meta_R ] + symbols[Group1] = [ Alt_R, Meta_R ] }; modifier_map Mod1 { <RALT> }; }; |