group revision bfd7cbc1
1// using the group(switch) map, the right alt key temporarily chooses 
2// the second keyboard group (until it is released).
3//
4partial modifier_keys 
5xkb_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//
15partial modifier_keys 
16xkb_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.
28partial modifier_keys
29xkb_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.
38partial modifier_keys
39xkb_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.
50partial modifier_keys
51xkb_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
60partial modifier_keys
61xkb_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).
69partial modifier_keys 
70xkb_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)
82partial modifier_keys 
83xkb_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.
93partial modifier_keys 
94xkb_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.
111partial modifier_keys 
112xkb_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.
124partial modifier_keys
125xkb_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
135partial modifier_keys
136xkb_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
143partial modifier_keys
144xkb_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
151partial modifier_keys
152xkb_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
171partial modifier_keys
172xkb_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.
189partial modifier_keys 
190xkb_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// using the group(alt_shift_toggle) map, pressing:
213//     Shift_L+Alt_L locks the previous group
214//     Shift_R+Alt_R locks the next group
215// If you have two groups and group wrap is enabled, the effect is
216// indistinguishable.
217partial modifier_keys 
218xkb_symbols "alt_shift_toggle" {
219    virtual_modifiers Alt;
220    key <LALT> {
221	symbols[Group1]= [ NoSymbol,	ISO_Prev_Group ],
222	virtualMods= Alt
223    };
224    key <RALT> {
225	symbols[Group1]= [ NoSymbol,	ISO_Next_Group ],
226	virtualMods= Alt
227    };
228    key <LFSH> {
229	type[Group1]="PC_ALT_LEVEL2",
230	symbols[Group1]= [ Shift_L,	ISO_Prev_Group ]
231    };
232    key <RTSH> {
233	type[Group1]="PC_ALT_LEVEL2",
234	symbols[Group1]= [ Shift_R,	ISO_Next_Group ]
235    };
236};
237
238// using the group(menu_toggle) map, pressing:
239//     Menu key toggles groups
240//     Shift+Menu acts as Menu
241partial modifier_keys
242xkb_symbols "menu_toggle" {
243    key	<MENU> {	[  ISO_Next_Group,	 Menu	]	};
244};
245
246// using the group(lwin_toggle) map, pressing the left Windows' logo key
247// toggles groups.  If you use this map, you would declare you keyboard
248// as pc101 or pc102 instead of pc104 or pc105.
249partial modifier_keys
250xkb_symbols "lwin_toggle" {
251  virtual_modifiers AltGr;
252  key <LWIN> {
253    virtualMods= AltGr,
254    symbols[Group1] = [ ISO_Next_Group ]
255    };
256};
257
258// using the group(rwin_toggle) map, pressing the right Windows' logo key
259// toggles groups.  If you use this map, you would declare you keyboard
260// as pc101 or pc102 instead of pc104 or pc105.
261partial modifier_keys
262xkb_symbols "rwin_toggle" {
263  virtual_modifiers AltGr;
264  key <RWIN> {
265    virtualMods= AltGr,
266    symbols[Group1] = [ ISO_Next_Group ]
267    };
268};
269
270// Both Ctrls pressed together toggle group
271partial modifier_keys
272xkb_symbols "ctrls_toggle" {
273  virtual_modifiers LControl, RControl;
274    key <LCTL> {
275	type[Group1]="PC_RCONTROL_LEVEL2",
276	symbols[Group1]= [ NoSymbol,	ISO_Prev_Group ],
277	virtualMods= LControl
278    };
279    key <RCTL> {
280	type[Group1]="PC_LCONTROL_LEVEL2",
281	symbols[Group1]= [ NoSymbol,	ISO_Next_Group ],
282	virtualMods= RControl
283    };
284};
285
286// Both Alts pressed together toggle group
287partial modifier_keys
288xkb_symbols "alts_toggle" {
289  virtual_modifiers LAlt, RAlt;
290    key <LALT> {
291	type[Group1]="PC_RALT_LEVEL2",
292	symbols[Group1]= [ NoSymbol,	ISO_Prev_Group ],
293	virtualMods= LAlt
294    };
295    key <RALT> {
296	type[Group1]="PC_LALT_LEVEL2",
297	symbols[Group1]= [ NoSymbol,	ISO_Next_Group ],
298	virtualMods= RAlt
299    };
300};
301
302// Left Shift key toggles group
303partial modifier_keys
304xkb_symbols "lshift_toggle" {
305  virtual_modifiers AltGr;
306    key <LFSH>	{	
307	symbols[Group1]= [	ISO_Next_Group	],
308	virtualMods= AltGr
309    };
310};
311
312// Right Shift key toggles group
313partial modifier_keys
314xkb_symbols "rshift_toggle" {
315  virtual_modifiers AltGr;
316    key <RTSH>	{	
317	symbols[Group1]= [	ISO_Next_Group	],
318	virtualMods= AltGr
319    };
320};
321
322// Left Alt key toggles group
323partial modifier_keys
324xkb_symbols "lalt_toggle" {
325  virtual_modifiers AltGr;
326    key <LALT>	{	
327	symbols[Group1]= [	ISO_Next_Group	],
328	virtualMods= AltGr
329    };
330};
331
332// Left Ctrl key toggles group
333partial modifier_keys
334xkb_symbols "lctrl_toggle" {
335  virtual_modifiers AltGr;
336    key <LCTL>	{	
337	symbols[Group1]= [	ISO_Next_Group	],
338	virtualMods= AltGr
339    };
340};
341
342// Right Ctrl key toggles group
343partial modifier_keys
344xkb_symbols "rctrl_toggle" {
345  virtual_modifiers AltGr;
346    key <RCTL>	{	
347	symbols[Group1]= [	ISO_Next_Group	],
348	virtualMods= AltGr
349    };
350};
351
352// using the group(alt_caps_toggle) map, pressing:
353//     Alt+Caps Lock toggles group
354//     Caps Lock toggles caps lock
355partial modifier_keys
356xkb_symbols "alt_caps_toggle" {
357    key        <CAPS> {
358       type="PC_ALT_LEVEL2",
359       symbols[Group1]= [  Caps_Lock,  ISO_Next_Group]
360    };
361};
362
363partial hidden modifier_keys
364xkb_symbols "olpc" {
365  key <I219>  { [ ISO_Next_Group, ISO_Prev_Group ] };
366};
367
368partial modifier_keys
369xkb_symbols "alt_space_toggle" {
370    key <SPCE> {
371    type[Group1]="PC_ALT_LEVEL2",
372    symbols[Group1]= [ space,   ISO_Next_Group ]
373    };
374};
375
376// using the group(sclk_toggle) map, pressing the Scroll Lock key
377// toggles groups.
378partial modifier_keys
379xkb_symbols "sclk_toggle" {
380  virtual_modifiers AltGr;
381  key <SCLK> {
382    virtualMods= AltGr,
383    symbols[Group1] = [ ISO_Next_Group ]
384    };
385};
386
387// Control_L+Win_L locks the first group (presumably Lat).
388// Control_R+Menu locks the second group (presumably Rus).
389partial modifier_keys
390xkb_symbols "lctrl_lwin_rctrl_menu" {
391    key <LWIN> {
392        type[ Group1 ]    = "PC_CONTROL_LEVEL2",
393        symbols[ Group1 ] = [ Super_L,    ISO_First_Group ]
394    };
395    key <MENU> {
396        type[ Group1 ]    = "PC_CONTROL_LEVEL2",
397        symbols[ Group1 ] = [ Menu,       ISO_Last_Group ]
398    };
399}; // lctrl_lwin_rctrl_menu
400