Add three options for swapping the left Ctrl and Alt and Win keys.
authorBenno Schulenberg <bensberg@justemail.net>
Wed, 4 Dec 2013 19:51:49 +0000 (20:51 +0100)
committerSergey Udaltsov <sergey.udaltsov@gmail.com>
Wed, 18 Dec 2013 22:33:58 +0000 (22:33 +0000)
These additions were proposed by Mildred Ki'Lya in:
https://bugs.freedesktop.org/show_bug.cgi?id=17960

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
rules/base.xml.in
symbols/ctrl

index 853b34ae7c3dfa6142bb52d1551d8462f9913cf2..8291c0d19585f989f6f140856218c6282d3dfd75 100644 (file)
           <_description>Right Alt as Right Ctrl</_description>
         </configItem>
       </option>
+      <option>
+        <configItem>
+          <name>ctrl:swap_lalt_lctl</name>
+          <_description>Swap Left Alt key with Left Ctrl key</_description>
+        </configItem>
+      </option>
+      <option>
+        <configItem>
+          <name>ctrl:swap_lwin_lctl</name>
+          <_description>Swap Left Win key with Left Ctrl key</_description>
+        </configItem>
+      </option>
+      <option>
+        <configItem>
+          <name>ctrl:swap_lalt_lctl_lwin</name>
+          <_description>Left Alt as Ctrl, Left Ctrl as Win, Left Win as Alt</_description>
+        </configItem>
+      </option>
     </group>
     <group allowMultipleSelection="true">
       <!-- Using startard LEDs to indicate the alternative (not first) group(s) -->
index 343a3d6deb75f3d7484215d8c04f54b79537ed50..7375f41156411b65bd24732d60680bbbd5d90f10 100644 (file)
@@ -55,3 +55,26 @@ xkb_symbols "ralt_rctrl" {
                          symbols[Group1] = [ Control_R, Control_R ] };
     modifier_map Control { <RALT> };
 };
+
+// Swap the functions of the left Alt key and the left Ctrl key.
+partial modifier_keys
+xkb_symbols "swap_lalt_lctl" {
+    replace key <LALT> { [ Control_L, Control_L ] };
+    replace key <LCTL> { [ Alt_L, Meta_L ] };
+};
+
+// Swap the functions of the left Win key and the left Ctrl key.
+partial modifier_keys
+xkb_symbols "swap_lwin_lctl" {
+    replace key <LWIN> { [ Control_L ] };
+    replace key <LCTL> { [ Super_L ] };
+};
+
+// Map Ctrl to the left Alt key, Alt to the left Win key,
+// and Super to the left Ctrl key.
+partial modifier_keys
+xkb_symbols "swap_lalt_lctl_lwin" {
+    replace key <LALT> { [ Control_L, Control_L ] };
+    replace key <LWIN> { [ Alt_L, Meta_L ] };
+    replace key <LCTL> { [ Super_L ] };
+};