added grp:rctrl_rshift_toggle 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(ctrl_alt_toggle) map, pressing:
172 //     Control_L+Alt_L locks the previous group
173 //     Control_R+Alt_R locks the next group
174 // If you have two groups and group wrap is enabled, the effect is
175 // indistinguishable.
176 partial modifier_keys 
177 xkb_symbols "ctrl_alt_toggle" {
178     virtual_modifiers Alt;
179     key <LALT> {
180         type[Group1]="PC_CONTROL_LEVEL2",
181         symbols[Group1]= [ NoSymbol,    ISO_Prev_Group ],
182         virtualMods= Alt
183     };
184     key <RALT> {
185         type[Group1]="PC_CONTROL_LEVEL2",
186         symbols[Group1]= [ NoSymbol,    ISO_Next_Group ],
187         virtualMods= Alt
188     };
189     key <LCTL> {
190         type[Group1]="PC_ALT_LEVEL2",
191         symbols[Group1]= [ Control_L,   ISO_Prev_Group ]
192     };
193     key <RCTL> {
194         type[Group1]="PC_ALT_LEVEL2",
195         symbols[Group1]= [ Control_R,   ISO_Next_Group ]
196     };
197 };
198
199 // using the group(alt_shift_toggle) map, pressing:
200 //     Shift_L+Alt_L locks the previous group
201 //     Shift_R+Alt_R locks the next group
202 // If you have two groups and group wrap is enabled, the effect is
203 // indistinguishable.
204 partial modifier_keys 
205 xkb_symbols "alt_shift_toggle" {
206     virtual_modifiers Alt;
207     key <LALT> {
208         symbols[Group1]= [ NoSymbol,    ISO_Prev_Group ],
209         virtualMods= Alt
210     };
211     key <RALT> {
212         symbols[Group1]= [ NoSymbol,    ISO_Next_Group ],
213         virtualMods= Alt
214     };
215     key <LFSH> {
216         type[Group1]="PC_ALT_LEVEL2",
217         symbols[Group1]= [ Shift_L,     ISO_Prev_Group ]
218     };
219     key <RTSH> {
220         type[Group1]="PC_ALT_LEVEL2",
221         symbols[Group1]= [ Shift_R,     ISO_Next_Group ]
222     };
223 };
224
225 // using the group(menu_toggle) map, pressing:
226 //     Menu key toggles groups
227 //     Shift+Menu acts as Menu
228 partial modifier_keys
229 xkb_symbols "menu_toggle" {
230     key <MENU> {        [  ISO_Next_Group,       Menu   ]       };
231 };
232
233 // using the group(lwin_toggle) map, pressing the left Windows' logo key
234 // toggles groups.  If you use this map, you would declare you keyboard
235 // as pc101 or pc102 instead of pc104 or pc105.
236 partial modifier_keys
237 xkb_symbols "lwin_toggle" {
238   virtual_modifiers AltGr;
239   key <LWIN> {
240     virtualMods= AltGr,
241     symbols[Group1] = [ ISO_Next_Group ]
242     };
243 };
244
245 // using the group(rwin_toggle) map, pressing the right Windows' logo key
246 // toggles groups.  If you use this map, you would declare you keyboard
247 // as pc101 or pc102 instead of pc104 or pc105.
248 partial modifier_keys
249 xkb_symbols "rwin_toggle" {
250   virtual_modifiers AltGr;
251   key <RWIN> {
252     virtualMods= AltGr,
253     symbols[Group1] = [ ISO_Next_Group ]
254     };
255 };
256
257 // Both Ctrls pressed together toggle group
258 partial modifier_keys
259 xkb_symbols "ctrls_toggle" {
260   virtual_modifiers LControl, RControl;
261     key <LCTL> {
262         type[Group1]="PC_RCONTROL_LEVEL2",
263         symbols[Group1]= [ NoSymbol,    ISO_Prev_Group ],
264         virtualMods= LControl
265     };
266     key <RCTL> {
267         type[Group1]="PC_LCONTROL_LEVEL2",
268         symbols[Group1]= [ NoSymbol,    ISO_Next_Group ],
269         virtualMods= RControl
270     };
271 };
272
273 // Both Alts pressed together toggle group
274 partial modifier_keys
275 xkb_symbols "alts_toggle" {
276   virtual_modifiers LAlt, RAlt;
277     key <LALT> {
278         type[Group1]="PC_RALT_LEVEL2",
279         symbols[Group1]= [ NoSymbol,    ISO_Prev_Group ],
280         virtualMods= LAlt
281     };
282     key <RALT> {
283         type[Group1]="PC_LALT_LEVEL2",
284         symbols[Group1]= [ NoSymbol,    ISO_Next_Group ],
285         virtualMods= RAlt
286     };
287 };
288
289 // Left Shift key toggles group
290 partial modifier_keys
291 xkb_symbols "lshift_toggle" {
292   virtual_modifiers AltGr;
293     key <LFSH>  {       
294         symbols[Group1]= [      ISO_Next_Group  ],
295         virtualMods= AltGr
296     };
297 };
298
299 // Right Shift key toggles group
300 partial modifier_keys
301 xkb_symbols "rshift_toggle" {
302   virtual_modifiers AltGr;
303     key <RTSH>  {       
304         symbols[Group1]= [      ISO_Next_Group  ],
305         virtualMods= AltGr
306     };
307 };
308
309 // Left Alt key toggles group
310 partial modifier_keys
311 xkb_symbols "lalt_toggle" {
312   virtual_modifiers AltGr;
313     key <LALT>  {       
314         symbols[Group1]= [      ISO_Next_Group  ],
315         virtualMods= AltGr
316     };
317 };
318
319 // Left Ctrl key toggles group
320 partial modifier_keys
321 xkb_symbols "lctrl_toggle" {
322   virtual_modifiers AltGr;
323     key <LCTL>  {       
324         symbols[Group1]= [      ISO_Next_Group  ],
325         virtualMods= AltGr
326     };
327 };
328
329 // Right Ctrl key toggles group
330 partial modifier_keys
331 xkb_symbols "rctrl_toggle" {
332   virtual_modifiers AltGr;
333     key <RCTL>  {       
334         symbols[Group1]= [      ISO_Next_Group  ],
335         virtualMods= AltGr
336     };
337 };
338
339 // using the group(alt_caps_toggle) map, pressing:
340 //     Alt+Caps Lock toggles group
341 //     Caps Lock toggles caps lock
342 partial modifier_keys
343 xkb_symbols "alt_caps_toggle" {
344     key        <CAPS> {
345        type="PC_ALT_LEVEL2",
346        symbols[Group1]= [  Caps_Lock,  ISO_Next_Group]
347     };
348 };
349
350 partial hidden modifier_keys
351 xkb_symbols "olpc" {
352   key <I219>  { [ ISO_Next_Group, ISO_Prev_Group ] };
353 };
354
355 partial modifier_keys
356 xkb_symbols "alt_space_toggle" {
357     key <SPCE> {
358     type[Group1]="PC_ALT_LEVEL2",
359     symbols[Group1]= [ space,   ISO_Next_Group ]
360     };
361 };
362
363 // using the group(sclk_toggle) map, pressing the Scroll Lock key
364 // toggles groups.
365 partial modifier_keys
366 xkb_symbols "sclk_toggle" {
367   virtual_modifiers AltGr;
368   key <SCLK> {
369     virtualMods= AltGr,
370     symbols[Group1] = [ ISO_Next_Group ]
371     };
372 };
373