separating group(olpc), b.fd.o#14225
[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   key <LWIN> {
34     symbols[Group1] = [ Mode_switch, Multi_key ],
35     virtualMods= AltGr
36     };
37   key <RWIN> {
38     symbols[Group1] = [ Mode_switch, Multi_key ],
39     virtualMods= AltGr
40     };
41 };
42
43 // using the group(lwin_switch) map, the left Windows' logo key
44 // temporarily chooses the second keyboard group (until it is
45 // released).  If you use this map, you would declare you keyboard as
46 // pc101 or pc102 instead of pc104 or pc105.
47 partial modifier_keys
48 xkb_symbols "lwin_switch" {
49   key <LWIN> {
50     symbols[Group1] = [ Mode_switch, Multi_key ],
51     virtualMods= AltGr
52     };
53 };
54
55 // using the group(rwin_switch) map, the right Windows' logo key
56 // temporarily chooses the second keyboard group (until it is
57 // released).  If you use this map, you would declare you keyboard as
58 // pc101 or pc102 instead of pc104 or pc105.
59 partial modifier_keys
60 xkb_symbols "rwin_switch" {
61   key <RWIN> {
62     symbols[Group1] = [ Mode_switch, Multi_key ],
63     virtualMods= AltGr
64     };
65 };
66
67 // Right Ctrl key temporary chooses the second keyboard group.
68 // Needed mainly for Canadian keyboard
69 partial modifier_keys
70 xkb_symbols "rctrl_switch" {
71     key <RCTL>  {
72         symbols[Group1]= [ Mode_switch ]
73     };
74 };
75
76 // using the group(toggle) map, pressing the right alt key switches to
77 // the next sequential group (until the next explicit group change).
78 partial modifier_keys 
79 xkb_symbols "toggle" {
80     virtual_modifiers AltGr;
81     key <RALT>  {       
82         symbols[Group1]= [      ISO_Next_Group  ],
83         virtualMods= AltGr
84     };
85 };
86
87 // using the group(shifts_toggle) map, pressing both shift keys together
88 // locks the next or previous sequential keyboard group 
89 // (depending on which shift is pressed first - right or left, 
90 // correspongingly)
91 partial modifier_keys 
92 xkb_symbols "shifts_toggle" {
93     key <LFSH>  {       [       Shift_L,        ISO_Prev_Group ]        };
94     key <RTSH>  {       [       Shift_R,        ISO_Next_Group ]        };
95 };
96
97 // using the group(ctrl_shift_toggle) map, pressing:
98 //     Control_L+Shift_L locks the previous group
99 //     Control_R+Shift_R locks the next group
100 // If you have two groups and group wrap is enabled, the effect is
101 // indistinguishable.
102 partial modifier_keys 
103 xkb_symbols "ctrl_shift_toggle" {
104     key <LFSH> {
105         type[Group1]="PC_CONTROL_LEVEL2",
106         symbols[Group1]= [ Shift_L,     ISO_Prev_Group ]
107     };
108     key <RTSH> {
109         type[Group1]="PC_CONTROL_LEVEL2",
110         symbols[Group1]= [ Shift_R,     ISO_Next_Group ]
111     };
112     key <LCTL>  {       [       Control_L,      ISO_Prev_Group ]        };
113     key <RCTL>  {       [       Control_R,      ISO_Next_Group ]        };
114 };
115
116 // using the group(lctrl_lshift_toggle) map, pressing:
117 //     Control_L+Shift_L locks the next group
118 // If you have two groups and group wrap is enabled, the effect is
119 // indistinguishable.
120 partial modifier_keys 
121 xkb_symbols "lctrl_lshift_toggle" {
122     key <LFSH> {
123         type[Group1]="PC_CONTROL_LEVEL2",
124         symbols[Group1]= [ Shift_L,     ISO_Next_Group ]
125     };
126     key <LCTL>  {       [       Control_L,      ISO_Next_Group ]        };
127 };
128
129 // using the group(caps_toggle) map, pressing:
130 //     Caps Lock toggles groups
131 //     Shift+Caps Lock toggles caps lock
132 partial modifier_keys
133 xkb_symbols "caps_toggle" {
134     include "capslock(grouplock)"
135 };
136
137 // using the group(shift_caps_toggle) map, pressing:
138 //     Shift+Caps Lock toggles group
139 partial modifier_keys
140 xkb_symbols "shift_caps_toggle" {
141     key <CAPS> {        [  Caps_Lock,           ISO_Next_Group  ]       };
142 };
143
144 // using the group(ctrl_alt_toggle) map, pressing:
145 //     Control_L+Alt_L locks the previous group
146 //     Control_R+Alt_R locks the next group
147 // If you have two groups and group wrap is enabled, the effect is
148 // indistinguishable.
149 partial modifier_keys 
150 xkb_symbols "ctrl_alt_toggle" {
151     virtual_modifiers Alt;
152     key <LALT> {
153         type[Group1]="PC_CONTROL_LEVEL2",
154         symbols[Group1]= [ NoSymbol,    ISO_Prev_Group ],
155         virtualMods= Alt
156     };
157     key <RALT> {
158         type[Group1]="PC_CONTROL_LEVEL2",
159         symbols[Group1]= [ NoSymbol,    ISO_Next_Group ],
160         virtualMods= Alt
161     };
162     key <LCTL> {
163         type[Group1]="PC_ALT_LEVEL2",
164         symbols[Group1]= [ Control_L,   ISO_Prev_Group ]
165     };
166     key <RCTL> {
167         type[Group1]="PC_ALT_LEVEL2",
168         symbols[Group1]= [ Control_R,   ISO_Next_Group ]
169     };
170 };
171
172 // using the group(alt_shift_toggle) map, pressing:
173 //     Shift_L+Alt_L locks the previous group
174 //     Shift_R+Alt_R locks the next group
175 // If you have two groups and group wrap is enabled, the effect is
176 // indistinguishable.
177 partial modifier_keys 
178 xkb_symbols "alt_shift_toggle" {
179     virtual_modifiers Alt;
180     key <LALT> {
181         symbols[Group1]= [ NoSymbol,    ISO_Prev_Group ],
182         virtualMods= Alt
183     };
184     key <RALT> {
185         symbols[Group1]= [ NoSymbol,    ISO_Next_Group ],
186         virtualMods= Alt
187     };
188     key <LFSH> {
189         type[Group1]="PC_ALT_LEVEL2",
190         symbols[Group1]= [ Shift_L,     ISO_Prev_Group ]
191     };
192     key <RTSH> {
193         type[Group1]="PC_ALT_LEVEL2",
194         symbols[Group1]= [ Shift_R,     ISO_Next_Group ]
195     };
196 };
197
198 // using the group(menu_toggle) map, pressing:
199 //     Menu key toggles groups
200 //     Shift+Menu acts as Menu
201 partial modifier_keys
202 xkb_symbols "menu_toggle" {
203     key <MENU> {        [  ISO_Next_Group,       Menu   ]       };
204 };
205
206 // using the group(lwin_toggle) map, pressing the left Windows' logo key
207 // toggles groups.  If you use this map, you would declare you keyboard
208 // as pc101 or pc102 instead of pc104 or pc105.
209 partial modifier_keys
210 xkb_symbols "lwin_toggle" {
211   virtual_modifiers AltGr;
212   key <LWIN> {
213     virtualMods= AltGr,
214     symbols[Group1] = [ ISO_Next_Group ]
215     };
216 };
217
218 // using the group(rwin_toggle) map, pressing the right Windows' logo key
219 // toggles groups.  If you use this map, you would declare you keyboard
220 // as pc101 or pc102 instead of pc104 or pc105.
221 partial modifier_keys
222 xkb_symbols "rwin_toggle" {
223   virtual_modifiers AltGr;
224   key <RWIN> {
225     virtualMods= AltGr,
226     symbols[Group1] = [ ISO_Next_Group ]
227     };
228 };
229
230 // Both Ctrls pressed together toggle group
231 partial modifier_keys
232 xkb_symbols "ctrls_toggle" {
233   virtual_modifiers LControl, RControl;
234     key <LCTL> {
235         type[Group1]="PC_RCONTROL_LEVEL2",
236         symbols[Group1]= [ NoSymbol,    ISO_Prev_Group ],
237         virtualMods= LControl
238     };
239     key <RCTL> {
240         type[Group1]="PC_LCONTROL_LEVEL2",
241         symbols[Group1]= [ NoSymbol,    ISO_Next_Group ],
242         virtualMods= RControl
243     };
244 };
245
246 // Both Alts pressed together toggle group
247 partial modifier_keys
248 xkb_symbols "alts_toggle" {
249   virtual_modifiers LAlt, RAlt;
250     key <LALT> {
251         type[Group1]="PC_RALT_LEVEL2",
252         symbols[Group1]= [ NoSymbol,    ISO_Prev_Group ],
253         virtualMods= LAlt
254     };
255     key <RALT> {
256         type[Group1]="PC_LALT_LEVEL2",
257         symbols[Group1]= [ NoSymbol,    ISO_Next_Group ],
258         virtualMods= RAlt
259     };
260 };
261
262 // Left Shift key toggles group
263 partial modifier_keys
264 xkb_symbols "lshift_toggle" {
265   virtual_modifiers AltGr;
266     key <LFSH>  {       
267         symbols[Group1]= [      ISO_Next_Group  ],
268         virtualMods= AltGr
269     };
270 };
271
272 // Right Shift key toggles group
273 partial modifier_keys
274 xkb_symbols "rshift_toggle" {
275   virtual_modifiers AltGr;
276     key <RTSH>  {       
277         symbols[Group1]= [      ISO_Next_Group  ],
278         virtualMods= AltGr
279     };
280 };
281
282 // Left Alt key toggles group
283 partial modifier_keys
284 xkb_symbols "lalt_toggle" {
285   virtual_modifiers AltGr;
286     key <LALT>  {       
287         symbols[Group1]= [      ISO_Next_Group  ],
288         virtualMods= AltGr
289     };
290 };
291
292 // Left Ctrl key toggles group
293 partial modifier_keys
294 xkb_symbols "lctrl_toggle" {
295   virtual_modifiers AltGr;
296     key <LCTL>  {       
297         symbols[Group1]= [      ISO_Next_Group  ],
298         virtualMods= AltGr
299     };
300 };
301
302 // Right Ctrl key toggles group
303 partial modifier_keys
304 xkb_symbols "rctrl_toggle" {
305   virtual_modifiers AltGr;
306     key <RCTL>  {       
307         symbols[Group1]= [      ISO_Next_Group  ],
308         virtualMods= AltGr
309     };
310 };
311
312 // using the group(alt_caps_toggle) map, pressing:
313 //     Alt+Caps Lock toggles group
314 //     Caps Lock toggles caps lock
315 partial modifier_keys
316 xkb_symbols "alt_caps_toggle" {
317     key        <CAPS> {
318        type="PC_ALT_LEVEL2",
319        symbols[Group1]= [  Caps_Lock,  ISO_Next_Group]
320     };
321 };
322
323 partial hidden modifier_keys
324 xkb_symbols "olpc" {
325   key <I219>  { [ ISO_Next_Group, ISO_Prev_Group ] };
326 };
327