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