summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenno Schulenberg <bensberg@telfort.nl>2022-05-11 12:29:30 +0200
committerBenno Schulenberg <bensberg@telfort.nl>2022-05-13 11:13:10 +0200
commitd5267985f7863c157f7bbbdc398629012f86a8db (patch)
tree1ff42d36c39b162ce53df094f6bc09e6ecc4847f
parent0fb34101788d84e9a1d98b3730cc7b9295e0f19b (diff)
add a "Both Alts; AltGr for level 3" option for switching between groups
This allows the user to switch between layouts with the two Alt keys (to either the previous or the next group) *and* to use the right Alt key as third-level chooser. In the bargain it avoids either Alt key from producing a different symbol upon key release than upon press. This improves the fix for issue #316. Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
-rw-r--r--rules/0036-lo_s.part1
-rw-r--r--rules/0037-l1o_s.part1
-rw-r--r--rules/0038-l2o_s.part1
-rw-r--r--rules/0039-l3o_s.part1
-rw-r--r--rules/0040-l4o_s.part1
-rw-r--r--rules/base.xml6
-rw-r--r--symbols/group14
7 files changed, 25 insertions, 0 deletions
diff --git a/rules/0036-lo_s.part b/rules/0036-lo_s.part
index f0dce017..4deb2a92 100644
--- a/rules/0036-lo_s.part
+++ b/rules/0036-lo_s.part
@@ -1,5 +1,6 @@
! layout option = symbols
* grp:alts_toggle = +group(alts_toggle)
+ * grp:alt_altgr_toggle = +group(alt_altgr_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 bff67ea9..16413eef 100644
--- a/rules/0037-l1o_s.part
+++ b/rules/0037-l1o_s.part
@@ -1,5 +1,6 @@
! layout[1] option = symbols
* grp:alts_toggle = +group(alts_toggle):1
+ * grp:alt_altgr_toggle = +group(alt_altgr_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 fd711c03..86786f4e 100644
--- a/rules/0038-l2o_s.part
+++ b/rules/0038-l2o_s.part
@@ -1,5 +1,6 @@
! layout[2] option = symbols
* grp:alts_toggle = +group(alts_toggle):2
+ * grp:alt_altgr_toggle = +group(alt_altgr_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 1e7d5e99..caee66e6 100644
--- a/rules/0039-l3o_s.part
+++ b/rules/0039-l3o_s.part
@@ -1,5 +1,6 @@
! layout[3] option = symbols
* grp:alts_toggle = +group(alts_toggle):3
+ * grp:alt_altgr_toggle = +group(alt_altgr_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 46ef8934..ab6f4d9c 100644
--- a/rules/0040-l4o_s.part
+++ b/rules/0040-l4o_s.part
@@ -1,5 +1,6 @@
! layout[4] option = symbols
* grp:alts_toggle = +group(alts_toggle):4
+ * grp:alt_altgr_toggle = +group(alt_altgr_toggle):4
* lv3:ralt_alt = +level3(ralt_alt):4
* misc:typo = +typo(base):4
* misc:apl = +apl(level3):4
diff --git a/rules/base.xml b/rules/base.xml
index 0a4e9750..f766f113 100644
--- a/rules/base.xml
+++ b/rules/base.xml
@@ -6962,6 +6962,12 @@
</option>
<option>
<configItem>
+ <name>grp:alt_altgr_toggle</name>
+ <description>Both Alt together; AltGr alone chooses third level</description>
+ </configItem>
+ </option>
+ <option>
+ <configItem>
<name>grp:ctrls_toggle</name>
<description>Both Ctrl together</description>
</configItem>
diff --git a/symbols/group b/symbols/group
index 62cd3011..ab37724e 100644
--- a/symbols/group
+++ b/symbols/group
@@ -360,6 +360,20 @@ xkb_symbols "alts_toggle" {
};
};
+// Pressing Alt plus AltGr switches to the next or previous group
+// (depending on which one is pressed first).
+partial modifier_keys
+xkb_symbols "alt_altgr_toggle" {
+ key <LALT> {
+ type[Group1]="FOUR_LEVEL",
+ symbols[Group1] = [ Alt_L, Alt_L, ISO_Prev_Group, ISO_Prev_Group ]
+ };
+ key <RALT> {
+ type[Group1]="PC_ALT_LEVEL2",
+ symbols[Group1] = [ ISO_Level3_Shift, ISO_Next_Group ]
+ };
+};
+
// Pressing the left Shift key switches to the next group.
partial modifier_keys
xkb_symbols "lshift_toggle" {