Debian Codegraph @

test/data/keymaps/explicit-actions.xkb

raw
1 xkb_keymap {
2 xkb_keycodes "(unnamed)" {
3 minimum = 8;
4 maximum = 255;
5 <ESC> = 9;
6 <AE01> = 10;
7 <AE02> = 11;
8 <AE03> = 12;
9 <AE04> = 13;
10 <AE05> = 14;
11 <AE06> = 15;
12 <AE07> = 16;
13 <AE08> = 17;
14 <AE09> = 18;
15 <AE10> = 19;
16 <AE11> = 20;
17 <AE12> = 21;
18 <BKSP> = 22;
19 <TAB> = 23;
20 <AD01> = 24;
21 <AD02> = 25;
22 <AD03> = 26;
23 <AD04> = 27;
24 <AD05> = 28;
25 <AD06> = 29;
26 <AD07> = 30;
27 <AD08> = 31;
28 <AD09> = 32;
29 <AD10> = 33;
30 <AD11> = 34;
31 <AD12> = 35;
32 <RTRN> = 36;
33 <LCTL> = 37;
34 <AC01> = 38;
35 <AC02> = 39;
36 <AC03> = 40;
37 <AC04> = 41;
38 <AC05> = 42;
39 <AC06> = 43;
40 <AC07> = 44;
41 <AC08> = 45;
42 <AC09> = 46;
43 <AC10> = 47;
44 <AC11> = 48;
45 <TLDE> = 49;
46 <LFSH> = 50;
47 <BKSL> = 51;
48 <AB01> = 52;
49 <AB02> = 53;
50 <AB03> = 54;
51 <AB04> = 55;
52 <AB05> = 56;
53 <AB06> = 57;
54 <AB07> = 58;
55 <AB08> = 59;
56 <AB09> = 60;
57 <AB10> = 61;
58 <RTSH> = 62;
59 <KPMU> = 63;
60 <LALT> = 64;
61 <SPCE> = 65;
62 <CAPS> = 66;
63 <FK01> = 67;
64 <FK02> = 68;
65 <FK03> = 69;
66 <FK04> = 70;
67 <FK05> = 71;
68 <FK06> = 72;
69 <FK07> = 73;
70 <FK08> = 74;
71 <FK09> = 75;
72 <FK10> = 76;
73 <NMLK> = 77;
74 <SCLK> = 78;
75 <KP7> = 79;
76 <KP8> = 80;
77 <KP9> = 81;
78 <KPSU> = 82;
79 <KP4> = 83;
80 <KP5> = 84;
81 <KP6> = 85;
82 <KPAD> = 86;
83 <KP1> = 87;
84 <KP2> = 88;
85 <KP3> = 89;
86 <KP0> = 90;
87 <KPDL> = 91;
88 <LVL3> = 92;
89 <LSGT> = 94;
90 <FK11> = 95;
91 <FK12> = 96;
92 <AB11> = 97;
93 <RCTL> = 105;
94 <RALT> = 108;
95 <LWIN> = 133;
96 <RWIN> = 134;
97 <COMP> = 135;
98 <MDSW> = 203;
99 <ALT> = 204;
100 <META> = 205;
101 <SUPR> = 206;
102 <HYPR> = 207;
103 };
104
105 xkb_types "(unnamed)" {
106 virtual_modifiers NumLock,Alt,LevelThree,ScrollLock,LevelFive,Super,AltGr,Meta,Hyper;
107
108 type "ONE_LEVEL" {
109 modifiers= none;
110 level_name[1]= "Any";
111 };
112 type "TWO_LEVEL" {
113 modifiers= Shift;
114 map[Shift]= 2;
115 level_name[1]= "Base";
116 level_name[2]= "Shift";
117 };
118 type "ALPHABETIC" {
119 modifiers= Shift+Lock;
120 map[Shift]= 2;
121 map[Lock]= 2;
122 level_name[1]= "Base";
123 level_name[2]= "Caps";
124 };
125 type "FOUR_LEVEL" {
126 modifiers= Shift+LevelThree;
127 map[Shift]= 2;
128 map[LevelThree]= 3;
129 map[Shift+LevelThree]= 4;
130 level_name[1]= "Base";
131 level_name[2]= "Shift";
132 level_name[3]= "AltGr";
133 level_name[4]= "Shift AltGr";
134 };
135 type "EIGHT_LEVEL_ALPHABETIC_LEVEL_FIVE_LOCK" {
136 modifiers= Shift+Lock+NumLock+LevelThree+LevelFive;
137 map[Shift]= 2;
138 map[LevelThree]= 3;
139 map[Shift+LevelThree]= 4;
140 map[LevelFive]= 5;
141 map[Shift+LevelFive]= 6;
142 preserve[Shift+LevelFive]= Shift;
143 map[LevelThree+LevelFive]= 7;
144 map[Shift+LevelThree+LevelFive]= 8;
145 map[NumLock]= 5;
146 map[Shift+NumLock]= 6;
147 preserve[Shift+NumLock]= Shift;
148 map[NumLock+LevelThree]= 7;
149 map[Shift+NumLock+LevelThree]= 8;
150 map[Shift+NumLock+LevelFive]= 2;
151 map[NumLock+LevelThree+LevelFive]= 3;
152 map[Shift+NumLock+LevelThree+LevelFive]= 4;
153 map[Lock]= 2;
154 map[Lock+LevelThree]= 3;
155 map[Shift+Lock+LevelThree]= 4;
156 map[Lock+LevelFive]= 5;
157 map[Shift+Lock+LevelFive]= 6;
158 map[Lock+LevelThree+LevelFive]= 7;
159 map[Shift+Lock+LevelThree+LevelFive]= 8;
160 map[Lock+NumLock]= 5;
161 map[Shift+Lock+NumLock]= 6;
162 map[Lock+NumLock+LevelThree]= 7;
163 map[Shift+Lock+NumLock+LevelThree]= 8;
164 map[Lock+NumLock+LevelFive]= 2;
165 map[Lock+NumLock+LevelThree+LevelFive]= 4;
166 map[Shift+Lock+NumLock+LevelThree+LevelFive]= 3;
167 level_name[1]= "Base";
168 level_name[2]= "Shift";
169 level_name[3]= "Alt Base";
170 level_name[4]= "Shift Alt";
171 level_name[5]= "X";
172 level_name[6]= "X Shift";
173 level_name[7]= "X Alt Base";
174 level_name[8]= "X Shift Alt";
175 };
176 type "FOUR_LEVEL_SEMIALPHABETIC" {
177 modifiers= Shift+Lock+LevelThree;
178 map[Shift]= 2;
179 map[Lock]= 2;
180 map[LevelThree]= 3;
181 map[Shift+LevelThree]= 4;
182 map[Lock+LevelThree]= 3;
183 preserve[Lock+LevelThree]= Lock;
184 map[Shift+Lock+LevelThree]= 4;
185 preserve[Shift+Lock+LevelThree]= Lock;
186 level_name[1]= "Base";
187 level_name[2]= "Shift";
188 level_name[3]= "AltGr";
189 level_name[4]= "Shift AltGr";
190 };
191 };
192
193 xkb_compatibility "(unnamed)" {
194 virtual_modifiers NumLock,Alt,LevelThree,ScrollLock,LevelFive,Super,AltGr,Meta,Hyper;
195
196 interpret.useModMapMods= AnyLevel;
197 interpret.repeat= False;
198 interpret ISO_Level2_Latch+Exactly(Shift) {
199 useModMapMods=level1;
200 action= LatchMods(modifiers=Shift,clearLocks,latchToLock);
201 };
202 interpret Shift_Lock+AnyOf(Shift+Lock) {
203 action= LockMods(modifiers=Shift);
204 };
205 interpret Num_Lock+AnyOf(all) {
206 virtualModifier= NumLock;
207 action= LockMods(modifiers=NumLock);
208 };
209 interpret ISO_Level3_Shift+AnyOf(all) {
210 virtualModifier= LevelThree;
211 useModMapMods=level1;
212 action= SetMods(modifiers=LevelThree,clearLocks);
213 };
214 interpret ISO_Level3_Latch+AnyOf(all) {
215 virtualModifier= LevelThree;
216 useModMapMods=level1;
217 action= LatchMods(modifiers=LevelThree,clearLocks,latchToLock);
218 };
219 interpret ISO_Level3_Lock+AnyOf(all) {
220 virtualModifier= LevelThree;
221 useModMapMods=level1;
222 action= LockMods(modifiers=LevelThree);
223 };
224 interpret Alt_L+AnyOf(all) {
225 virtualModifier= Alt;
226 action= SetMods(modifiers=modMapMods,clearLocks);
227 };
228 interpret Alt_R+AnyOf(all) {
229 virtualModifier= Alt;
230 action= SetMods(modifiers=modMapMods,clearLocks);
231 };
232 interpret ISO_Level5_Shift+AnyOf(all) {
233 virtualModifier= LevelFive;
234 useModMapMods=level1;
235 action= SetMods(modifiers=LevelFive,clearLocks);
236 };
237 interpret Mode_switch+AnyOfOrNone(all) {
238 virtualModifier= AltGr;
239 useModMapMods=level1;
240 action= SetGroup(group=+1);
241 };
242 interpret ISO_Level3_Shift+AnyOfOrNone(all) {
243 action= SetMods(modifiers=LevelThree,clearLocks);
244 };
245 interpret ISO_Next_Group+AnyOfOrNone(all) {
246 virtualModifier= AltGr;
247 useModMapMods=level1;
248 action= LockGroup(group=+1);
249 };
250 interpret ISO_Prev_Group+AnyOfOrNone(all) {
251 virtualModifier= AltGr;
252 useModMapMods=level1;
253 action= LockGroup(group=-1);
254 };
255 interpret Alt_L+AnyOfOrNone(all) {
256 action= SetMods(modifiers=Alt,clearLocks);
257 };
258 interpret Alt_R+AnyOfOrNone(all) {
259 action= SetMods(modifiers=Alt,clearLocks);
260 };
261 interpret Shift_L+AnyOfOrNone(all) {
262 action= SetMods(modifiers=Shift,clearLocks);
263 };
264 interpret Shift_R+AnyOfOrNone(all) {
265 action= SetMods(modifiers=Shift,clearLocks);
266 };
267 interpret ISO_Level5_Shift+AnyOfOrNone(all) {
268 action= SetMods(modifiers=LevelFive,clearLocks);
269 };
270 interpret ISO_Level5_Latch+AnyOfOrNone(all) {
271 action= LatchMods(modifiers=LevelFive,clearLocks,latchToLock);
272 };
273 interpret ISO_Level5_Lock+AnyOfOrNone(all) {
274 action= LockMods(modifiers=LevelFive);
275 };
276 interpret Any+AnyOf(all) {
277 action= SetMods(modifiers=modMapMods,clearLocks);
278 };
279 };
280
281 xkb_symbols "(unnamed)" {
282 name[1]="English (US)";
283 name[2]="Czech";
284 name[3]="German (Neo 2)";
285
286 key <AD05> {
287 //// repeat=Yes is set with the default *interpretation*, but
288 //// using explicit actions makes the key keep the initial value,
289 //// i.e. repeat=No.
290 //repeat= Yes,
291 symbols[1]= [ t, T ],
292 //actions[1]= [ NoAction(), NoAction() ],
293 symbols[2]= [ Cyrillic_ie, Cyrillic_IE ],
294 actions[2]= [ NoAction(), NoAction() ],
295 symbols[3]= [ w, W ]//,
296 //actions[3]= [ NoAction(), NoAction() ]
297 };
298 key <AD06> {
299 type[3]= "EIGHT_LEVEL_ALPHABETIC_LEVEL_FIVE_LOCK",
300 symbols[1]= [ y, Y ],
301 symbols[2]= [ z, Z, leftarrow, yen ],
302 symbols[3]= [ k, K, exclam, Greek_kappa, exclamdown, NoSymbol, multiply, NoSymbol ]
303 };
304 key <LFSH> {
305 type[3]= "TWO_LEVEL",
306 symbols[1]= [ Shift_L ],
307 symbols[2]= [ Shift_L ],
308 symbols[3]= [ Shift_L, Caps_Lock ]
309 };
310 //// This should set the key’s EXPLICIT_INTERP explicit flag and
311 //// the group 2 explicit_actions, but it should still allow to
312 //// interpret the keysyms in groups 1 and 3.
313 key <LALT> {
314 type[1]= "ONE_LEVEL",
315 type[2]= "TWO_LEVEL",
316 type[3]= "TWO_LEVEL",
317 //repeat= No,
318 symbols[1]= [ Shift_L ],
319 //actions[1]= [ SetMods(modifiers=Shift,clearLocks) ],
320 symbols[2]= [ ISO_Level3_Shift, Multi_key ],
321 actions[2]= [ SetMods(modifiers=LevelThree), NoAction() ],
322 symbols[3]= [ ISO_Level5_Shift, ISO_Level3_Shift ]//,
323 //actions[3]= [ SetMods(modifiers=LevelFive,clearLocks), SetMods(modifiers=LevelThree,clearLocks) ]
324 };
325 key <LVL3> {
326 type= "ONE_LEVEL",
327 //// The following fields are added, because they are set via
328 //// compatibility interpretations, but using explicit actions
329 //// disable them.
330 //repeat= No,
331 //virtualMods= LevelThree,
332 symbols[1]= [ ISO_Level3_Shift ],
333 //actions[1]= [ SetMods(modifiers=LevelThree,clearLocks) ],
334 symbols[2]= [ ISO_Level3_Shift ],
335 actions[2]= [ SetMods(modifiers=LevelThree) ],
336 symbols[3]= [ ISO_Level3_Shift ]//,
337 //actions[3]= [ SetMods(modifiers=LevelThree,clearLocks) ]
338 };
339 key <LSGT> {
340 symbols[1]= [ less, greater, bar, brokenbar ],
341 symbols[2]= [ backslash, bar, slash, NoSymbol ],
342 symbols[3]= [ ISO_Level5_Shift ]
343 };
344 key <RALT> {
345 type[1]= "TWO_LEVEL",
346 type[2]= "ONE_LEVEL",
347 type[3]= "ONE_LEVEL",
348 symbols[1]= [ Alt_R, Meta_R ],
349 symbols[2]= [ ISO_Level3_Shift ],
350 symbols[3]= [ ISO_Level5_Shift ]
351 };
352 key <COMP> { [ ISO_Next_Group, Menu ] };
353 key <MDSW> {
354 type= "ONE_LEVEL",
355 symbols[1]= [ ISO_Level5_Shift ],
356 symbols[2]= [ ISO_Level5_Shift ],
357 symbols[3]= [ ISO_Level5_Shift ]
358 };
359 key <ALT> { [ NoSymbol, Alt_L ] };
360 key <META> { [ NoSymbol, Meta_L ] };
361 key <SUPR> { [ NoSymbol, Super_L ] };
362 modifier_map Shift { <LFSH>, <RTSH> };
363 modifier_map Mod1 { <RALT>, <ALT>, <META> };
364 modifier_map Mod3 { <MDSW> };
365 modifier_map Mod5 { <LVL3> };
366 };
367
368 };