symbols/level[35]: Move the default section to the head of the files.
authorBenno Schulenberg <bensberg@justemail.net>
Sat, 21 Sep 2013 07:59:53 +0000 (09:59 +0200)
committerSergey Udaltsov <sergey.udaltsov@gmail.com>
Mon, 30 Sep 2013 21:47:58 +0000 (22:47 +0100)
When no section is specified, 'xkbcomp' simply takes the first one
from the file, it does not look for the keyword 'default'.  So make
it do something sane and useful when the user is terse.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
symbols/level3
symbols/level5

index 1142c89..fc08985 100644 (file)
@@ -1,16 +1,6 @@
 // These partial variants assign ISO_Level3_Shift to various XKB keycodes
 // so that the third shift level can be reached.
 
-// Ensure a mapping to a real modifier for LevelThree.
-partial modifier_keys
-xkb_symbols "modifier_mapping" {
-  replace key <LVL3> {
-    type[Group1] = "ONE_LEVEL";
-    symbols[Group1] = [ ISO_Level3_Shift ]
-  };
-  modifier_map Mod5 { <LVL3> };
-};
-
 // The default behaviour:
 // the right Alt key (AltGr) chooses the third symbol engraved on a key.
 default partial modifier_keys
@@ -22,6 +12,16 @@ xkb_symbols "ralt_switch" {
   include "level3(modifier_mapping)"
 };
 
+// Ensure a mapping to a real modifier for LevelThree.
+partial modifier_keys
+xkb_symbols "modifier_mapping" {
+  replace key <LVL3> {
+    type[Group1] = "ONE_LEVEL";
+    symbols[Group1] = [ ISO_Level3_Shift ]
+  };
+  modifier_map Mod5 { <LVL3> };
+};
+
 // The right Alt key never chooses the third level.
 // This option attempts to undo the effect of a layout's inclusion of
 // 'ralt_switch'.  You may want to also select another level3 option
index 4c5a833..c4c760f 100644 (file)
@@ -1,16 +1,6 @@
 // These partial variants assign ISO_Level5_Shift to various XKB keycodes
 // so that the fifth shift level can be reached.
 
-// Ensure a mapping to a real modifier for LevelFive.
-partial modifier_keys
-xkb_symbols "modifier_mapping" {
-  replace key <MDSW> {
-    type[Group1] = "ONE_LEVEL";
-    symbols[Group1] = [ ISO_Level5_Shift ]
-  };
-  modifier_map Mod3 { <MDSW> };
-};
-
 // The right Ctrl key (while pressed) chooses the fifth shift level.
 partial modifier_keys
 xkb_symbols "rctrl_switch" {
@@ -41,6 +31,16 @@ xkb_symbols "ralt_switch" {
   include "level5(modifier_mapping)"
 };
 
+// Ensure a mapping to a real modifier for LevelFive.
+partial modifier_keys
+xkb_symbols "modifier_mapping" {
+  replace key <MDSW> {
+    type[Group1] = "ONE_LEVEL";
+    symbols[Group1] = [ ISO_Level5_Shift ]
+  };
+  modifier_map Mod3 { <MDSW> };
+};
+
 
 // This adds the definitions needed to create a level5-lock behaviour, using
 // the real modifier NumLock as a lock indicator.