diff options
author | Benno Schulenberg <bensberg@telfort.nl> | 2023-04-09 12:42:48 +0200 |
---|---|---|
committer | Benno Schulenberg <bensberg@telfort.nl> | 2023-04-10 17:10:30 +0200 |
commit | 54457f7b5760de2e6de7ee759603c032eb1d8e17 (patch) | |
tree | b154447f5c4439d22ace6e8d87b7d6f09d5623ae /symbols/level3 | |
parent | 5e97fe105e553412a838e037afd261fdb5c6211a (diff) | |
download | xkeyboard-config-54457f7b5760de2e6de7ee759603c032eb1d8e17.tar.gz |
symbols/level*: contract each key definition onto one line, when possible
This makes it easier to see where which symbols are assigned to a key
when grepping for its code.
Also improve a couple of comments.
Diffstat (limited to 'symbols/level3')
-rw-r--r-- | symbols/level3 | 94 |
1 files changed, 24 insertions, 70 deletions
diff --git a/symbols/level3 b/symbols/level3 index f76906f..95d02a3 100644 --- a/symbols/level3 +++ b/symbols/level3 @@ -1,14 +1,11 @@ -// These partial variants assign ISO_Level3_Shift to various XKB keycodes -// so that the third shift level can be reached. +// These variants assign ISO_Level3_Shift to various keys +// so that levels 3 and 4 can be reached. // The default behaviour: // the right Alt key (AltGr) chooses the third symbol engraved on a key. default partial modifier_keys xkb_symbols "ralt_switch" { - key <RALT> { - type[Group1]="ONE_LEVEL", - symbols[Group1] = [ ISO_Level3_Shift ] - }; + key <RALT> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" }; }; // The right Alt key never chooses the third level. @@ -17,10 +14,7 @@ xkb_symbols "ralt_switch" { // to map the level3 shift to some other key. partial modifier_keys xkb_symbols "ralt_alt" { - key <RALT> { - type[Group1]="TWO_LEVEL", - symbols[Group1] = [ Alt_R, Meta_R ] - }; + key <RALT> {[ Alt_R, Meta_R ], type[group1]="TWO_LEVEL" }; modifier_map Mod1 { <RALT> }; }; @@ -28,10 +22,7 @@ xkb_symbols "ralt_alt" { // and Compose is mapped to its second level. partial modifier_keys xkb_symbols "ralt_switch_multikey" { - key <RALT> { - type[Group1]="TWO_LEVEL", - symbols[Group1] = [ ISO_Level3_Shift, Multi_key ] - }; + key <RALT> {[ ISO_Level3_Shift, Multi_key ], type[group1]="TWO_LEVEL" }; }; // Either Alt key (while pressed) chooses the third shift level. @@ -45,28 +36,19 @@ xkb_symbols "alt_switch" { // The left Alt key (while pressed) chooses the third shift level. partial modifier_keys xkb_symbols "lalt_switch" { - key <LALT> { - type[Group1]="ONE_LEVEL", - symbols[Group1] = [ ISO_Level3_Shift ] - }; + key <LALT> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" }; }; // The right Ctrl key (while pressed) chooses the third shift level. partial modifier_keys xkb_symbols "switch" { - key <RCTL> { - type[Group1]="ONE_LEVEL", - symbols[Group1] = [ ISO_Level3_Shift ] - }; + key <RCTL> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" }; }; // The Menu key (while pressed) chooses the third shift level. partial modifier_keys xkb_symbols "menu_switch" { - key <MENU> { - type[Group1]="ONE_LEVEL", - symbols[Group1] = [ ISO_Level3_Shift ] - }; + key <MENU> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" }; }; // Either Win key (while pressed) chooses the third shift level. @@ -79,100 +61,72 @@ xkb_symbols "win_switch" { // The left Win key (while pressed) chooses the third shift level. partial modifier_keys xkb_symbols "lwin_switch" { - key <LWIN> { - type[Group1]="ONE_LEVEL", - symbols[Group1] = [ ISO_Level3_Shift ] - }; + key <LWIN> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" }; }; // The right Win key (while pressed) chooses the third shift level. partial modifier_keys xkb_symbols "rwin_switch" { - key <RWIN> { - type[Group1]="ONE_LEVEL", - symbols[Group1] = [ ISO_Level3_Shift ] - }; + key <RWIN> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" }; }; // The Enter key on the kepypad (while pressed) chooses the third shift level. // (This is especially useful for Mac laptops which miss the right Alt key.) partial modifier_keys xkb_symbols "enter_switch" { - key <KPEN> { - type[Group1]="ONE_LEVEL", - symbols[Group1] = [ ISO_Level3_Shift ] - }; + key <KPEN> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" }; }; // The CapsLock key (while pressed) chooses the third shift level. partial modifier_keys xkb_symbols "caps_switch" { - key <CAPS> { - type[Group1]="ONE_LEVEL", - symbols[Group1] = [ ISO_Level3_Shift ] - }; + key <CAPS> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" }; }; // The Backslash key (while pressed) chooses the third shift level. partial modifier_keys xkb_symbols "bksl_switch" { - key <BKSL> { - type[Group1]="ONE_LEVEL", - symbols[Group1] = [ ISO_Level3_Shift ] - }; + key <BKSL> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" }; }; // The Less/Greater key (while pressed) chooses the third shift level. partial modifier_keys xkb_symbols "lsgt_switch" { - key <LSGT> { - type[Group1]="ONE_LEVEL", - symbols[Group1] = [ ISO_Level3_Shift ] - }; + key <LSGT> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" }; }; // The CapsLock key (while pressed) chooses the third shift level, // and latches when pressed together with another third-level chooser. partial modifier_keys xkb_symbols "caps_switch_latch" { - key <CAPS> { - type[Group1]="THREE_LEVEL", - symbols[Group1] = [ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Latch ] - }; + key <CAPS> {[ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Latch ], + type[group1]="THREE_LEVEL" }; }; // The Backslash key (while pressed) chooses the third shift level, // and latches when pressed together with another third-level chooser. partial modifier_keys xkb_symbols "bksl_switch_latch" { - key <BKSL> { - type[Group1]="THREE_LEVEL", - symbols[Group1] = [ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Latch ] - }; + key <BKSL> {[ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Latch ], + type[group1]="THREE_LEVEL" }; }; // The Less/Greater key (while pressed) chooses the third shift level, // and latches when pressed together with another third-level chooser. partial modifier_keys xkb_symbols "lsgt_switch_latch" { - key <LSGT> { - type[Group1]="THREE_LEVEL", - symbols[Group1] = [ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Latch ] - }; + key <LSGT> {[ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Latch ], + type[group1]="THREE_LEVEL" }; }; -// Number key 4 chooses third shift level when pressed in isolation. +// Top-row digit key 4 chooses third shift level when pressed alone. partial modifier_keys xkb_symbols "4_switch_isolated" { - override key <AE04> { - symbols[Group1] = [ ISO_Level3_Shift ] - }; + override key <AE04> {[ ISO_Level3_Shift ]}; }; -// Number key 9 chooses third shift level when pressed in isolation. +// Top-row digit key 9 chooses third shift level when pressed alone. partial modifier_keys xkb_symbols "9_switch_isolated" { - override key <AE09> { - symbols[Group1] = [ ISO_Level3_Shift ] - }; + override key <AE09> {[ ISO_Level3_Shift ]}; }; |