1// The right Alt key (while pressed) chooses the next group.
2partial modifier_keys
3xkb_symbols "switch" {
4    key <RALT> {[  Mode_switch,  Multi_key  ]};
5};
6
7// The left Alt key (while pressed) chooses the next group.
8partial modifier_keys
9xkb_symbols "lswitch" {
10    key <LALT> {[  Mode_switch,  Multi_key  ]};
11};
12
13// The left Win key (while pressed) chooses the next group.
14partial modifier_keys
15xkb_symbols "lwin_switch" {
16    key <LWIN> {[  Mode_switch,  Multi_key  ]};
17};
18
19// The right Win key (while pressed) chooses the next group.
20partial modifier_keys
21xkb_symbols "rwin_switch" {
22    key <RWIN> {[  Mode_switch,  Multi_key  ]};
23};
24
25// Either Win key (while pressed) chooses the next group.
26partial modifier_keys
27xkb_symbols "win_switch" {
28    include "group(lwin_switch)"
29    include "group(rwin_switch)"
30};
31
32// The Menu key (while pressed) chooses the next group,
33// while Shift+Menu acts as Menu.
34partial modifier_keys
35xkb_symbols "menu_switch" {
36    key <MENU> {[  Mode_switch,  Menu  ]};
37};
38
39// The right Ctrl key (while pressed) chooses the next group.
40partial modifier_keys
41xkb_symbols "rctrl_switch" {
42    key <RCTL> {[  Mode_switch  ]};
43};
44
45// The Caps_Lock key (while pressed) chooses the next group,
46// while Alt+Caps_Lock toggles CapsLock.
47partial modifier_keys
48xkb_symbols "caps_switch" {
49    key <CAPS> {[  Mode_switch,  Caps_Lock  ], type[group1] = "PC_ALT_LEVEL2" };
50};
51
52// Pressing the right Alt key switches to the next group.
53partial modifier_keys
54xkb_symbols "toggle" {
55    key <RALT> {[  ISO_Next_Group  ]};
56};
57
58// Pressing the left Alt key switches to the next group.
59partial modifier_keys
60xkb_symbols "lalt_toggle" {
61    key <LALT> {[  ISO_Next_Group  ]};
62};
63
64// Pressing both Shift keys switches to the next or previous group
65// (depending on which Shift is pressed first).
66partial modifier_keys
67xkb_symbols "shifts_toggle" {
68    key <LFSH> {[  Shift_L,  ISO_Prev_Group  ]};
69    key <RTSH> {[  Shift_R,  ISO_Next_Group  ]};
70};
71
72// Pressing Caps_Lock switches to the next group,
73// while Shift+Caps_Lock toggles CapsLock.
74partial modifier_keys
75xkb_symbols "caps_toggle" {
76    key <CAPS> {[  ISO_Next_Group,  Caps_Lock  ], type[group1] = "TWO_LEVEL" };
77};
78
79// Pressing Shift+Caps_Lock switches to the next group,
80// while plain Caps_Lock toggles CapsLock.
81partial modifier_keys
82xkb_symbols "shift_caps_toggle" {
83    key <CAPS> {[  Caps_Lock,  ISO_Next_Group  ], type[group1] = "TWO_LEVEL" };
84};
85
86// Pressing Alt+Space switches to the next group.
87partial modifier_keys
88xkb_symbols "alt_space_toggle" {
89    key <SPCE> {[  space,  ISO_Next_Group  ], type[group1] = "PC_ALT_LEVEL2" };
90};
91
92// Pressing Win+Space switches to the next group.
93partial modifier_keys
94xkb_symbols "win_space_toggle" {
95    key <SPCE> {[  space,  ISO_Next_Group  ], type[group1] = "PC_SUPER_LEVEL2" };
96};
97
98// Pressing Ctrl+Space switches to the next group.
99partial modifier_keys
100xkb_symbols "ctrl_space_toggle" {
101    key <SPCE> {[  space,  ISO_Next_Group  ], type[group1] = "PC_CONTROL_LEVEL2" };
102};
103
104
105// Pressing Caps_Lock selects the first group,
106// pressing Shift+Caps_Lock selects the second group.
107partial modifier_keys
108xkb_symbols "caps_select" {
109    key <CAPS> {[  ISO_First_Group,  ISO_Last_Group  ], type[group1] = "TWO_LEVEL" };
110};
111
112// Pressing the left Win key selects the first group,
113// pressing the right Win key or the Menu key selects the second group.
114partial modifier_keys
115xkb_symbols "win_menu_select" {
116    key <LWIN> {[  ISO_First_Group  ]};
117    key <RWIN> {[  ISO_Last_Group  ]};
118    key <MENU> {[  ISO_Last_Group  ]};
119};
120
121// Pressing the left Ctrl key selects the first group,
122// pressing the right Ctrl key selects the second group.
123partial modifier_keys
124xkb_symbols "ctrl_select" {
125    key <LCTL> {[  ISO_First_Group  ]};
126    key <RCTL> {[  ISO_Last_Group  ]};
127};
128
129
130//
131// CTRL-SHIFT toggle section
132//
133partial modifier_keys
134xkb_symbols "lctrl_lshift_toggle" {
135    key <LFSH> {[  Shift_L,  ISO_Next_Group  ], type[group1] = "PC_CONTROL_LEVEL2" };
136    key <LCTL> {[  Control_L,  ISO_Next_Group  ]};
137};
138
139partial modifier_keys
140xkb_symbols "lctrl_lshift_toggle_rev" {
141    key <LFSH> {[  Shift_L,  ISO_Prev_Group  ], type[group1] = "PC_CONTROL_LEVEL2" };
142    key <LCTL> {[  Control_L,  ISO_Prev_Group  ]};
143};
144
145partial modifier_keys
146xkb_symbols "rctrl_rshift_toggle" {
147    key <RTSH> {[  Shift_R,  ISO_Next_Group  ], type[group1] = "PC_CONTROL_LEVEL2" };
148    key <RCTL> {[  Control_R,  ISO_Next_Group  ]};
149};
150
151partial modifier_keys
152xkb_symbols "ctrl_shift_toggle" {
153    include "group(lctrl_lshift_toggle)"
154    include "group(rctrl_rshift_toggle)"
155};
156
157partial modifier_keys
158xkb_symbols "ctrl_shift_toggle_bidir" {
159    include "group(lctrl_lshift_toggle_rev)"
160    include "group(rctrl_rshift_toggle)"
161};
162
163
164//
165// CTRL-ALT toggle section
166//
167partial modifier_keys
168xkb_symbols "lctrl_lalt_toggle" {
169    key <LALT> {[  NoSymbol,  ISO_Next_Group  ], type[group1] = "PC_CONTROL_LEVEL2" };
170    key <LCTL> {[  Control_L,  ISO_Next_Group  ], type[group1] = "PC_ALT_LEVEL2" };
171};
172
173partial modifier_keys
174xkb_symbols "lctrl_lalt_toggle_rev" {
175    key <LALT> {[  NoSymbol,  ISO_Prev_Group  ], type[group1] = "PC_CONTROL_LEVEL2" };
176    key <LCTL> {[  Control_L,  ISO_Prev_Group  ], type[group1] = "PC_ALT_LEVEL2" };
177};
178
179partial modifier_keys
180xkb_symbols "rctrl_ralt_toggle" {
181    key <RALT> {[  NoSymbol,  ISO_Next_Group  ], type[group1] = "PC_CONTROL_LEVEL2" };
182    key <RCTL> {[  Control_R,  ISO_Next_Group  ], type[group1] = "PC_ALT_LEVEL2" };
183};
184
185partial modifier_keys
186xkb_symbols "ctrl_alt_toggle" {
187    include "group(lctrl_lalt_toggle)"
188    include "group(rctrl_ralt_toggle)"
189};
190
191partial modifier_keys
192xkb_symbols "ctrl_alt_toggle_bidir" {
193    include "group(lctrl_lalt_toggle_rev)"
194    include "group(rctrl_ralt_toggle)"
195};
196
197
198//
199// ALT-SHIFT toggle section
200//
201partial modifier_keys
202xkb_symbols "lalt_lshift_toggle" {
203    key <LALT> {[  NoSymbol,  ISO_Next_Group  ], type[group1] = "TWO_LEVEL" };
204    key <LFSH> {[  Shift_L,  ISO_Next_Group  ], type[group1] = "PC_ALT_LEVEL2" };
205};
206
207partial modifier_keys
208xkb_symbols "lalt_lshift_toggle_rev" {
209    key <LALT> {[  NoSymbol,  ISO_Prev_Group  ], type[group1] = "TWO_LEVEL" };
210    key <LFSH> {[  Shift_L,  ISO_Prev_Group  ], type[group1] = "PC_ALT_LEVEL2" };
211};
212
213partial modifier_keys
214xkb_symbols "ralt_rshift_toggle" {
215    key <RALT> {[  NoSymbol,  ISO_Next_Group  ], type[group1] = "TWO_LEVEL" };
216    key <RTSH> {[  Shift_R,  ISO_Next_Group  ], type[group1] = "PC_ALT_LEVEL2" };
217};
218
219partial modifier_keys
220xkb_symbols "alt_shift_toggle" {
221    include "group(lalt_lshift_toggle)"
222    include "group(ralt_rshift_toggle)"
223};
224
225partial modifier_keys
226xkb_symbols "alt_shift_toggle_bidir" {
227    include "group(lalt_lshift_toggle_rev)"
228    include "group(ralt_rshift_toggle)"
229};
230
231
232// Pressing the Menu key switches to the next group,
233// while Shift+Menu acts as Menu.
234partial modifier_keys
235xkb_symbols "menu_toggle" {
236    key <MENU> {[  ISO_Next_Group,  Menu ]};
237};
238
239// Pressing the left Win key switches to the next group.
240partial modifier_keys
241xkb_symbols "lwin_toggle" {
242    key <LWIN> {[  ISO_Next_Group  ]};
243};
244
245// Pressing the right Win key switches to the next group.
246partial modifier_keys
247xkb_symbols "rwin_toggle" {
248    key <RWIN> {[  ISO_Next_Group  ]};
249};
250
251// Pressing both Ctrl keys switches to the next or previous group
252// (depending on which Ctrl is pressed first).
253partial modifier_keys
254xkb_symbols "ctrls_toggle" {
255    key <LCTL> {[  NoSymbol,  ISO_Prev_Group  ], type[group1] = "PC_CONTROL_LEVEL2" };
256    key <RCTL> {[  NoSymbol,  ISO_Next_Group  ], type[group1] = "PC_CONTROL_LEVEL2" };
257};
258
259// Pressing both Alt keys switches to the next or previous group
260// (depending on which Alt is pressed first).
261partial modifier_keys
262xkb_symbols "alts_toggle" {
263    key <LALT> {[  Alt_L,  ISO_Prev_Group  ], type[group1] = "PC_ALT_LEVEL2" };
264    key <RALT> {[  Alt_R,  ISO_Next_Group  ], type[group1] = "PC_ALT_LEVEL2" };
265};
266
267// Pressing Alt plus AltGr switches to the next or previous group
268// (depending on which one is pressed first).
269partial modifier_keys
270xkb_symbols "alt_altgr_toggle" {
271    key <LALT> {[  Alt_L,  Alt_L,  ISO_Prev_Group,  ISO_Prev_Group  ],
272							type[group1] = "FOUR_LEVEL" };
273    key <RALT> {[  ISO_Level3_Shift,  ISO_Next_Group  ], type[group1] = "PC_ALT_LEVEL2" };
274};
275
276// Pressing the left Shift key switches to the next group.
277partial modifier_keys
278xkb_symbols "lshift_toggle" {
279    key <LFSH> {[  ISO_Next_Group  ]};
280};
281
282// Pressing the right Shift key switches to the next group.
283partial modifier_keys
284xkb_symbols "rshift_toggle" {
285    key <RTSH> {[  ISO_Next_Group  ]};
286};
287
288// Pressing the left Ctrl key switches to the next group.
289partial modifier_keys
290xkb_symbols "lctrl_toggle" {
291    key <LCTL> {[  ISO_Next_Group  ]};
292};
293
294// Pressing the right Ctrl key switches to the next group.
295partial modifier_keys
296xkb_symbols "rctrl_toggle" {
297    key <RCTL> {[  ISO_Next_Group  ]};
298};
299
300// Pressing Alt+Caps_Lock switches to the next group,
301// while pressing Caps_Lock alone toggles CapsLock.
302partial modifier_keys
303xkb_symbols "alt_caps_toggle" {
304    key <CAPS> {[  Caps_Lock, ISO_Next_Group  ], type[group1] = "PC_ALT_LEVEL2" };
305};
306
307hidden partial modifier_keys
308xkb_symbols "olpc" {
309    key <I219> {[  ISO_Next_Group,  ISO_Prev_Group  ]};
310};
311
312// Pressing the Scroll Lock key switches to the next group.
313partial modifier_keys
314xkb_symbols "sclk_toggle" {
315    key <SCLK> {[  ISO_Next_Group  ]};
316};
317
318// Pressing Ctrl + the left Win key selects the first group,
319// pressing Ctrl + the Menu key selects the second group.
320partial modifier_keys
321xkb_symbols "lctrl_lwin_rctrl_menu" {
322    key <LWIN> {[  Super_L,  ISO_First_Group  ], type[group1] = "PC_CONTROL_LEVEL2" };
323    key <MENU> {[  Menu,  ISO_Last_Group  ], type[group1] = "PC_CONTROL_LEVEL2" };
324};
325
326// Pressing Ctrl + the left Win key switches to the next group.
327partial modifier_keys
328xkb_symbols "lctrl_lwin_toggle" {
329    key <LWIN> {[  Super_L,  ISO_Next_Group  ], type[group1] = "PC_CONTROL_LEVEL2" };
330};
331