group revision 797b363d
1// The right Alt key (while pressed) chooses the second keyboard group.
2partial modifier_keys
3xkb_symbols "switch" {
4    key <RALT> {
5        symbols[Group1] = [ Mode_switch, Multi_key ],
6        virtualMods= AltGr
7    };
8};
9
10// The left Alt key (while pressed) chooses the second keyboard group.
11partial modifier_keys
12xkb_symbols "lswitch" {
13    key <LALT> {
14        symbols[Group1] = [ Mode_switch, Multi_key ],
15        virtualMods= AltGr
16    };
17};
18
19// Either Win key (while pressed) chooses the second keyboard group.
20partial modifier_keys
21xkb_symbols "win_switch" {
22    include "group(lwin_switch)"
23    include "group(rwin_switch)"
24};
25
26// The left Win key (while pressed) chooses the second keyboard group.
27// (Using this map, you should declare your keyboard as pc101 or pc102
28// instead of pc104 or pc105.)
29partial modifier_keys
30xkb_symbols "lwin_switch" {
31    key <LWIN> {
32        symbols[Group1] = [ Mode_switch, Multi_key ],
33        virtualMods= AltGr
34    };
35};
36
37// The right Win key (while pressed) chooses the second keyboard group.
38// (Using this map, you should declare your keyboard as pc101 or pc102
39// instead of pc104 or pc105.)
40partial modifier_keys
41xkb_symbols "rwin_switch" {
42    key <RWIN> {
43        symbols[Group1] = [ Mode_switch, Multi_key ],
44        virtualMods= AltGr
45    };
46};
47
48// The right Ctrl key (while pressed) chooses the second keyboard group.
49// (Needed mainly for the Canadian keyboard.)
50partial modifier_keys
51xkb_symbols "rctrl_switch" {
52    key <RCTL> {
53        symbols[Group1] = [ Mode_switch ]
54    };
55};
56
57// Pressing the right Alt key switches to the next group.
58partial modifier_keys
59xkb_symbols "toggle" {
60    virtual_modifiers AltGr;
61    key <RALT> {
62        symbols[Group1] = [ ISO_Next_Group ],
63        virtualMods= AltGr
64    };
65};
66
67// Pressing both Shift keys switches to the next or previous group
68// (depending on which Shift is pressed first).
69partial modifier_keys
70xkb_symbols "shifts_toggle" {
71    key <LFSH> { [ Shift_L, ISO_Prev_Group ] };
72    key <RTSH> { [ Shift_R, ISO_Next_Group ] };
73};
74
75// Pressing Shift+Caps_Lock switches to the next group.
76partial modifier_keys
77xkb_symbols "shift_caps_toggle" {
78    key <CAPS> { [ Caps_Lock, ISO_Next_Group ] };
79};
80
81// Pressing Caps_Lock selects the first group,
82// pressing Shift+Caps_Lock selects the last group.
83partial modifier_keys
84xkb_symbols "shift_caps_switch" {
85    key <CAPS> { [ ISO_First_Group, ISO_Last_Group ] };
86};
87
88// Pressing the left Win key selects the first group,
89// pressing the right Win or the Menu key selects the last group.
90partial modifier_keys
91xkb_symbols "win_menu_switch" {
92    virtual_modifiers AltGr;
93    key <LWIN> {
94        virtualMods= AltGr,
95        symbols[Group1] = [ ISO_First_Group ]
96    };
97    key <MENU> {
98        virtualMods= AltGr,
99        symbols[Group1] = [ ISO_Last_Group ]
100    };
101    key <RWIN> {
102        virtualMods= AltGr,
103        symbols[Group1] = [ ISO_Last_Group ]
104    };
105};
106
107// Pressing the left Ctrl key selects the first group,
108// pressing the right Ctrl key selects the last group.
109partial modifier_keys
110xkb_symbols "lctrl_rctrl_switch" {
111    virtual_modifiers AltGr;
112    key <LCTL> {
113        virtualMods= AltGr,
114        symbols[Group1] = [ ISO_First_Group ]
115    };
116    key <RCTL> {
117        virtualMods= AltGr,
118        symbols[Group1] = [ ISO_Last_Group ]
119    };
120};
121
122
123//
124// CTRL-SHIFT toggle section
125//
126partial modifier_keys
127xkb_symbols "lctrl_lshift_toggle" {
128    key <LFSH> {
129        type[Group1]="PC_CONTROL_LEVEL2",
130        symbols[Group1] = [ Shift_L, ISO_Next_Group ]
131    };
132    key <LCTL> { [ Control_L, ISO_Next_Group ] };
133};
134
135partial modifier_keys
136xkb_symbols "lctrl_lshift_toggle_rev" {
137    key <LFSH> {
138        type[Group1]="PC_CONTROL_LEVEL2",
139        symbols[Group1] = [ Shift_L, ISO_Prev_Group ]
140    };
141    key <LCTL> { [ Control_L, ISO_Prev_Group ] };
142};
143
144partial modifier_keys
145xkb_symbols "rctrl_rshift_toggle" {
146    key <RTSH> {
147        type[Group1]="PC_CONTROL_LEVEL2",
148        symbols[Group1] = [ Shift_R, ISO_Next_Group ]
149    };
150    key <RCTL> { [ Control_R, ISO_Next_Group ] };
151};
152
153partial modifier_keys
154xkb_symbols "ctrl_shift_toggle" {
155    include "group(lctrl_lshift_toggle)"
156    include "group(rctrl_rshift_toggle)"
157};
158
159partial modifier_keys
160xkb_symbols "ctrl_shift_toggle_bidir" {
161    include "group(lctrl_lshift_toggle_rev)"
162    include "group(rctrl_rshift_toggle)"
163};
164
165
166//
167// CTRL-ALT toggle section
168//
169partial modifier_keys
170xkb_symbols "lctrl_lalt_toggle" {
171    virtual_modifiers Alt;
172    key <LALT> {
173        type[Group1]="PC_CONTROL_LEVEL2",
174        symbols[Group1] = [ NoSymbol, ISO_Next_Group ],
175        virtualMods= Alt
176    };
177    key <LCTL> {
178        type[Group1]="PC_ALT_LEVEL2",
179        symbols[Group1] = [ Control_L, ISO_Next_Group ]
180    };
181};
182
183partial modifier_keys
184xkb_symbols "lctrl_lalt_toggle_rev" {
185    virtual_modifiers Alt;
186    key <LALT> {
187        type[Group1]="PC_CONTROL_LEVEL2",
188        symbols[Group1] = [ NoSymbol, ISO_Prev_Group ],
189        virtualMods= Alt
190    };
191    key <LCTL> {
192        type[Group1]="PC_ALT_LEVEL2",
193        symbols[Group1] = [ Control_L, ISO_Prev_Group ]
194    };
195};
196
197partial modifier_keys
198xkb_symbols "rctrl_ralt_toggle" {
199    virtual_modifiers Alt;
200    key <RALT> {
201        type[Group1]="PC_CONTROL_LEVEL2",
202        symbols[Group1] = [ NoSymbol, ISO_Next_Group ],
203        virtualMods= Alt
204    };
205    key <RCTL> {
206        type[Group1]="PC_ALT_LEVEL2",
207        symbols[Group1] = [ Control_R, ISO_Next_Group ]
208    };
209};
210
211partial modifier_keys
212xkb_symbols "ctrl_alt_toggle" {
213    include "group(lctrl_lalt_toggle)"
214    include "group(rctrl_ralt_toggle)"
215};
216
217partial modifier_keys
218xkb_symbols "ctrl_alt_toggle_bidir" {
219    include "group(lctrl_lalt_toggle_rev)"
220    include "group(rctrl_ralt_toggle)"
221};
222
223
224//
225// ALT-SHIFT toggle section
226//
227partial modifier_keys
228xkb_symbols "lalt_lshift_toggle" {
229    virtual_modifiers Alt;
230    key <LALT> {
231        symbols[Group1] = [ NoSymbol, ISO_Next_Group ],
232        virtualMods= Alt
233    };
234    key <LFSH> {
235        type[Group1]="PC_ALT_LEVEL2",
236        symbols[Group1] = [ Shift_L, ISO_Next_Group ]
237    };
238};
239
240partial modifier_keys
241xkb_symbols "lalt_lshift_toggle_rev" {
242    virtual_modifiers Alt;
243    key <LALT> {
244        symbols[Group1] = [ NoSymbol, ISO_Prev_Group ],
245        virtualMods= Alt
246    };
247    key <LFSH> {
248        type[Group1]="PC_ALT_LEVEL2",
249        symbols[Group1] = [ Shift_L, ISO_Prev_Group ]
250    };
251};
252
253partial modifier_keys
254xkb_symbols "ralt_rshift_toggle" {
255    virtual_modifiers Alt;
256    key <RALT> {
257        symbols[Group1] = [ NoSymbol, ISO_Next_Group ],
258        virtualMods= Alt
259    };
260    key <RTSH> {
261        type[Group1]="PC_ALT_LEVEL2",
262        symbols[Group1] = [ Shift_R, ISO_Next_Group ]
263    };
264};
265
266partial modifier_keys
267xkb_symbols "alt_shift_toggle" {
268    include "group(lalt_lshift_toggle)"
269    include "group(ralt_rshift_toggle)"
270};
271
272partial modifier_keys
273xkb_symbols "alt_shift_toggle_bidir" {
274    include "group(lalt_lshift_toggle_rev)"
275    include "group(ralt_rshift_toggle)"
276};
277
278
279// Pressing the Menu key switches to the next group,
280// while Shift+Menu acts as Menu.
281partial modifier_keys
282xkb_symbols "menu_toggle" {
283    key <MENU> { [ ISO_Next_Group, Menu ] };
284};
285
286// Pressing the left Win key switches to the next group.
287// (Using this map, you should declare your keyboard as
288// pc101 or pc102 instead of pc104 or pc105.)
289partial modifier_keys
290xkb_symbols "lwin_toggle" {
291    virtual_modifiers AltGr;
292    key <LWIN> {
293         virtualMods= AltGr,
294        symbols[Group1] = [ ISO_Next_Group ]
295    };
296};
297
298// Pressing the right Win key switches to the next group.
299// (Using this map, you should declare your keyboard as
300// pc101 or pc102 instead of pc104 or pc105.)
301partial modifier_keys
302xkb_symbols "rwin_toggle" {
303    virtual_modifiers AltGr;
304    key <RWIN> {
305        virtualMods= AltGr,
306        symbols[Group1] = [ ISO_Next_Group ]
307    };
308};
309
310// Pressing both Ctrl keys switches to the next or previous group
311// (depending on which Ctrl is pressed first).
312partial modifier_keys
313xkb_symbols "ctrls_toggle" {
314    virtual_modifiers LControl, RControl;
315    key <LCTL> {
316        type[Group1]="PC_RCONTROL_LEVEL2",
317        symbols[Group1] = [ NoSymbol, ISO_Prev_Group ],
318        virtualMods= LControl
319    };
320    key <RCTL> {
321        type[Group1]="PC_LCONTROL_LEVEL2",
322        symbols[Group1] = [ NoSymbol, ISO_Next_Group ],
323        virtualMods= RControl
324    };
325};
326
327// Pressing both Alt keys switches to the next or previous group
328// (depending on which Alt is pressed first).
329partial modifier_keys
330xkb_symbols "alts_toggle" {
331    virtual_modifiers LAlt, RAlt;
332    key <LALT> {
333        type[Group1]="PC_RALT_LEVEL2",
334        symbols[Group1] = [ NoSymbol, ISO_Prev_Group ],
335        virtualMods= LAlt
336    };
337    key <RALT> {
338        type[Group1]="PC_LALT_LEVEL2",
339        symbols[Group1] = [ NoSymbol, ISO_Next_Group ],
340        virtualMods= RAlt
341    };
342};
343
344// Pressing the left Shift key switches to the next group.
345partial modifier_keys
346xkb_symbols "lshift_toggle" {
347    virtual_modifiers AltGr;
348    key <LFSH> {
349        symbols[Group1] = [ ISO_Next_Group ],
350        virtualMods= AltGr
351    };
352};
353
354// Pressing the right Shift key switches to the next group.
355partial modifier_keys
356xkb_symbols "rshift_toggle" {
357    virtual_modifiers AltGr;
358    key <RTSH> {
359        symbols[Group1] = [ ISO_Next_Group ],
360        virtualMods= AltGr
361    };
362};
363
364// Pressing the left Alt key switches to the next group.
365partial modifier_keys
366xkb_symbols "lalt_toggle" {
367    virtual_modifiers AltGr;
368    key <LALT> {
369        symbols[Group1] = [ ISO_Next_Group ],
370        virtualMods= AltGr
371    };
372};
373
374// Pressing the left Ctrl key switches to the next group.
375partial modifier_keys
376xkb_symbols "lctrl_toggle" {
377    virtual_modifiers AltGr;
378    key <LCTL> {
379        symbols[Group1] = [ ISO_Next_Group ],
380        virtualMods= AltGr
381    };
382};
383
384// Pressing the right Ctrl key switches to the next group.
385partial modifier_keys
386xkb_symbols "rctrl_toggle" {
387    virtual_modifiers AltGr;
388    key <RCTL> {
389        symbols[Group1] = [ ISO_Next_Group ],
390        virtualMods= AltGr
391    };
392};
393
394// Pressing Alt+Caps_Lock switches to the next group,
395// pressing Caps_Lock toggles CapsLock.
396partial modifier_keys
397xkb_symbols "alt_caps_toggle" {
398    key <CAPS> {
399       type="PC_ALT_LEVEL2",
400       symbols[Group1] = [ Caps_Lock, ISO_Next_Group ]
401    };
402};
403
404partial hidden modifier_keys
405xkb_symbols "olpc" {
406    key <I219> { [ ISO_Next_Group, ISO_Prev_Group ] };
407};
408
409partial modifier_keys
410xkb_symbols "alt_space_toggle" {
411    key <SPCE> {
412        type[Group1]="PC_ALT_LEVEL2",
413        symbols[Group1] = [ space, ISO_Next_Group ]
414    };
415};
416
417// Pressing the Scroll Lock key switches to the next group,
418partial modifier_keys
419xkb_symbols "sclk_toggle" {
420    virtual_modifiers AltGr;
421    key <SCLK> {
422        virtualMods= AltGr,
423        symbols[Group1] = [ ISO_Next_Group ]
424    };
425};
426
427// Control_L+Win_L selects the first group (presumably Lat),
428// Control_R+Menu selects the second group (presumably Rus).
429partial modifier_keys
430xkb_symbols "lctrl_lwin_rctrl_menu" {
431    key <LWIN> {
432        type[Group1] = "PC_CONTROL_LEVEL2",
433        symbols[Group1] = [ Super_L, ISO_First_Group ]
434    };
435    key <MENU> {
436        type[Group1] = "PC_CONTROL_LEVEL2",
437        symbols[Group1] = [ Menu, ISO_Last_Group ]
438    };
439};
440