summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenno Schulenberg <bensberg@telfort.nl>2022-09-18 17:03:02 +0200
committerBenno Schulenberg <bensberg@telfort.nl>2022-09-22 11:47:24 +0200
commit6bba53fd305ac2e6b20ec094a0f01337da563e17 (patch)
treefe1f5e5a4dffb9af000ad36fe742de79532e9903
parent28b21415b6b7df13c81036cf0c49aa71d5fefa0a (diff)
rules: rename an option, and compose its effect from two others
Making the CapsLock key into a Control key, and the left Control key into a group toggle, can be achieved by combining two existing options -- they just need to be combined in the correct order: the group toggle should override the second half of `swapcaps`. The option is also renamed, to more clearly express its result. An alias is added for compatibilty. (An alias for another option is also added, as commit 7124dd5127 put it in the wrong place.) This fixes issue #349.
-rw-r--r--rules/0042-o_s.part2
-rw-r--r--rules/compat/0041-o_s.part3
-rw-r--r--rules/compat/variantsMapping.lst1
-rw-r--r--rules/xfree982
-rw-r--r--symbols/ctrl9
5 files changed, 5 insertions, 12 deletions
diff --git a/rules/0042-o_s.part b/rules/0042-o_s.part
index a69cf6db..289d4a7e 100644
--- a/rules/0042-o_s.part
+++ b/rules/0042-o_s.part
@@ -81,7 +81,7 @@
ctrl:lctrl_meta = +ctrl(lctrl_meta)
ctrl:swapcaps = +ctrl(swapcaps)
ctrl:hyper_capscontrol = +ctrl(hyper_capscontrol)
- ctrl:swapcaps_and_switch_layout = +ctrl(swapcaps_and_switch_layout)
+ ctrl:grouptoggle_capscontrol = +ctrl(swapcaps)+group(lctrl_toggle)
ctrl:ac_ctrl = +ctrl(ac_ctrl)
ctrl:aa_ctrl = +ctrl(aa_ctrl)
ctrl:rctrl_ralt = +ctrl(rctrl_ralt)
diff --git a/rules/compat/0041-o_s.part b/rules/compat/0041-o_s.part
index 17ded7cb..89bc6859 100644
--- a/rules/compat/0041-o_s.part
+++ b/rules/compat/0041-o_s.part
@@ -3,3 +3,6 @@
grp:win_menu_switch = +group(win_menu_select)
grp:lctrl_rctrl_switch = +group(ctrl_select)
// Delete the above three aliases in July 2027.
+ ctrl:swapcaps_hyper = +ctrl(hyper_capscontrol)
+ ctrl:swapcaps_and_switch_layout = +ctrl(swapcaps)+group(lctrl_toggle)
+// Delete the above two aliases in September 2027.
diff --git a/rules/compat/variantsMapping.lst b/rules/compat/variantsMapping.lst
index 7c10067d..4afdb40a 100644
--- a/rules/compat/variantsMapping.lst
+++ b/rules/compat/variantsMapping.lst
@@ -1,6 +1,5 @@
ben basic in ben
ben probhat in ben_probhat
-ctrl swapcaps_hyper ctrl hyper_capscontrol
dev basic in deva
dzdwi basic bt basic
fi basic fi classic
diff --git a/rules/xfree98 b/rules/xfree98
index 0621377a..022811a0 100644
--- a/rules/xfree98
+++ b/rules/xfree98
@@ -24,7 +24,7 @@
ctrl:lctrl_meta = +ctrl(lctrl_meta)
ctrl:swapcaps = +ctrl(swapcaps)
ctrl:hyper_capscontrol = +ctrl(hyper_capscontrol)
- ctrl:swapcaps_and_switch_layout = +ctrl(swapcaps_and_switch_layout)
+ ctrl:grouptoggle_capscontrol = +ctrl(swapcaps)+group(lctrl_toggle)
ctrl:ac_ctrl = +ctrl(ac_ctrl)
ctrl:aa_ctrl = +ctrl(aa_ctrl)
diff --git a/symbols/ctrl b/symbols/ctrl
index 75aca176..5e44b4cd 100644
--- a/symbols/ctrl
+++ b/symbols/ctrl
@@ -30,15 +30,6 @@ xkb_symbols "hyper_capscontrol" {
modifier_map Mod4 { <LCTL> };
};
-// Set CapsLock to left Ctrl and left Ctrl to switch layout.
-partial modifier_keys
-xkb_symbols "swapcaps_and_switch_layout" {
- replace key <CAPS> { [ Control_L ] };
- replace key <LCTL> { [ ISO_Next_Group ] };
- modifier_map Control { <CAPS> };
- modifier_map Lock { <LCTL> };
-};
-
// Move Ctrl to the leftmost key on the middle row and CapsLock to the
// leftmost key on the bottom row. Only works if the geometry or keycodes
// file has defined appropriate aliases for the keys in question.