Debian Codegraph @

symbols/lv3

raw
1 // These variants assign ISO_Level3_Shift to various keys
2 // so that levels 3 and 4 can be reached.
3
4 // The default behaviour:
5 // the right Alt key (AltGr) chooses the third symbol engraved on a key.
6 default partial modifier_keys
7 xkb_symbols "ralt_switch" {
8 key <RALT> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" };
9 };
10
11 // The right Alt key never chooses the third level.
12 // This option attempts to undo the effect of a layout's inclusion of
13 // 'ralt_switch'. You may want to also select another level3 option
14 // to map the level3 shift to some other key.
15 partial modifier_keys
16 xkb_symbols "ralt_alt" {
17 key <RALT> {[ Alt_R, Meta_R ], type[group1]="TWO_LEVEL" };
18 modifier_map Mod1 { <RALT> };
19 };
20
21 // The right Alt key (while pressed) chooses the third shift level,
22 // and Compose is mapped to its second level.
23 partial modifier_keys
24 xkb_symbols "ralt_switch_multikey" {
25 key <RALT> {[ ISO_Level3_Shift, Multi_key ], type[group1]="TWO_LEVEL" };
26 };
27
28 // Either Alt key (while pressed) chooses the third shift level.
29 // (To be used mostly to imitate Mac OS functionality.)
30 partial modifier_keys
31 xkb_symbols "alt_switch" {
32 include "level3(lalt_switch)"
33 include "level3(ralt_switch)"
34 };
35
36 // The left Alt key (while pressed) chooses the third shift level.
37 partial modifier_keys
38 xkb_symbols "lalt_switch" {
39 key <LALT> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" };
40 };
41
42 // The right Ctrl key (while pressed) chooses the third shift level.
43 partial modifier_keys
44 xkb_symbols "switch" {
45 key <RCTL> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" };
46 };
47
48 // The Menu key (while pressed) chooses the third shift level.
49 partial modifier_keys
50 xkb_symbols "menu_switch" {
51 key <MENU> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" };
52 };
53
54 // Either Win key (while pressed) chooses the third shift level.
55 partial modifier_keys
56 xkb_symbols "win_switch" {
57 include "level3(lwin_switch)"
58 include "level3(rwin_switch)"
59 };
60
61 // The left Win key (while pressed) chooses the third shift level.
62 partial modifier_keys
63 xkb_symbols "lwin_switch" {
64 key <LWIN> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" };
65 };
66
67 // The right Win key (while pressed) chooses the third shift level.
68 partial modifier_keys
69 xkb_symbols "rwin_switch" {
70 key <RWIN> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" };
71 };
72
73 // The Enter key on the kepypad (while pressed) chooses the third shift level.
74 // (This is especially useful for Mac laptops which miss the right Alt key.)
75 partial modifier_keys
76 xkb_symbols "enter_switch" {
77 key <KPEN> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" };
78 };
79
80 // The CapsLock key (while pressed) chooses the third shift level.
81 partial modifier_keys
82 xkb_symbols "caps_switch" {
83 key <CAPS> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" };
84 };
85
86 // The CapsLock key (while pressed) chooses the third shift level and
87 // Ctrl + CapsLock has the original CapsLock function.
88 // The 2023 DIN standard for German keyboards recommends it as an option:
89 // - https://de.wikipedia.org/wiki/E1_(Tastaturbelegung)#Feststelltaste/Umschaltsperre
90 // - https://en.wikipedia.org/wiki/Caps_Lock#Abolition
91 partial modifier_keys
92 xkb_symbols "caps_switch_capslock_with_ctrl" {
93 virtual_modifiers LevelThree;
94
95 key <CAPS> {
96 type[Group1] = "PC_CONTROL_LEVEL2",
97 symbols[Group1] = [ ISO_Level3_Shift, Caps_Lock ],
98 // Explicit actions are preferred over modMap None/Mod5 { Caps_Lock }
99 // because they have no side effect
100 actions[Group1] = [ SetMods(modifiers = LevelThree), LockMods(modifiers = Lock) ]
101 };
102 };
103
104 // The Backslash key (while pressed) chooses the third shift level.
105 partial modifier_keys
106 xkb_symbols "bksl_switch" {
107 key <BKSL> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" };
108 };
109
110 // The AC11 key (while pressed) chooses the third shift level.
111 partial modifier_keys
112 xkb_symbols "ac11_switch" {
113 key <AC11> {[ ISO_Level3_Shift ], type[Group1]="ONE_LEVEL" };
114 };
115
116 // The Less/Greater key (while pressed) chooses the third shift level.
117 partial modifier_keys
118 xkb_symbols "lsgt_switch" {
119 key <LSGT> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" };
120 };
121
122 // The CapsLock key (while pressed) chooses the third shift level,
123 // and latches when pressed together with another third-level chooser.
124 partial modifier_keys
125 xkb_symbols "caps_switch_latch" {
126 key <CAPS> {[ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Latch ],
127 type[group1]="THREE_LEVEL" };
128 };
129
130 // The Backslash key (while pressed) chooses the third shift level,
131 // and latches when pressed together with another third-level chooser.
132 partial modifier_keys
133 xkb_symbols "bksl_switch_latch" {
134 key <BKSL> {[ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Latch ],
135 type[group1]="THREE_LEVEL" };
136 };
137
138 // The Less/Greater key (while pressed) chooses the third shift level,
139 // and latches when pressed together with another third-level chooser.
140 partial modifier_keys
141 xkb_symbols "lsgt_switch_latch" {
142 key <LSGT> {[ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Latch ],
143 type[group1]="THREE_LEVEL" };
144 };
145
146 // Top-row digit key 4 chooses third shift level when pressed alone.
147 partial modifier_keys
148 xkb_symbols "4_switch_isolated" {
149 override key <AE04> {[ ISO_Level3_Shift ]};
150 };
151
152 // Top-row digit key 9 chooses third shift level when pressed alone.
153 partial modifier_keys
154 xkb_symbols "9_switch_isolated" {
155 override key <AE09> {[ ISO_Level3_Shift ]};
156 };