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