level3 revision bfd7cbc1
1// these variants assign various XKB keycodes to ISO_Level3_Shift so that
2// the third shift level can be reached
3//
4
5// the default behavior is for the right Alt key (AltGr) to generate the
6// third engraved symbol
7default partial modifier_keys
8xkb_symbols "ralt_switch" {
9  key <RALT> {
10    type[Group1]="ONE_LEVEL",
11    symbols[Group1] = [ ISO_Level3_Shift ]
12    };
13  modifier_map Mod5   { ISO_Level3_Shift };
14};
15
16// Right Alt key never chooses 3rd level.
17// This option attempts to undo the effect of a layout's
18// including ralt_switch.  You may also want to select another
19// level3 option that maps the level3 shift to some other key.
20partial modifier_keys
21xkb_symbols "ralt_alt" {
22  key <RALT> { 
23    type[Group1]="TWO_LEVEL",
24    type[Group2]="TWO_LEVEL",
25    type[Group3]="TWO_LEVEL",
26    type[Group4]="TWO_LEVEL",
27    symbols[Group1] = [ Alt_R, Meta_R ], 
28    symbols[Group2] = [ Alt_R, Meta_R ], 
29    symbols[Group3] = [ Alt_R, Meta_R ], 
30    symbols[Group4] = [ Alt_R, Meta_R ]
31    };
32  modifier_map Mod1    { <RALT> };
33};
34
35partial modifier_keys
36xkb_symbols "ralt_switch_multikey" {
37  key <RALT> {
38    type[Group1]="TWO_LEVEL",
39    symbols[Group1] = [ ISO_Level3_Shift, Multi_key ]
40    };
41};
42
43// special case or right Alt switch - for use with grp:alts_toggle
44//
45partial hidden modifier_keys
46xkb_symbols "ralt_switch_for_alts_toggle" {
47 virtual_modifiers LAlt, AlGr;
48  key <LALT> {
49    type[Group1]="PC_RALT_LEVEL2",
50    symbols[Group1] = [ Alt_L,  ISO_Prev_Group,  ISO_Prev_Group ],
51    virtualMods= LAlt
52  };
53  key <RALT> {
54    type[Group1]="PC_ALT_LEVEL2",
55    symbols[Group1] = [ ISO_Level3_Shift, ISO_Next_Group ],
56    virtualMods= AltGr
57  };
58  modifier_map Mod5   { ISO_Level3_Shift };
59};
60
61// using the level(alt_switch) map, either Alt key temporarily chooses
62// the third shift level.  (Mostly be used to imitate Mac OS functionality.)
63partial modifier_keys
64xkb_symbols "alt_switch" {
65  include "level3(lalt_switch)"
66  include "level3(ralt_switch)"
67};
68
69partial modifier_keys
70xkb_symbols "lalt_switch" {
71  key <LALT> {
72    type[Group1]="ONE_LEVEL",
73    symbols[Group1] = [ ISO_Level3_Shift ]
74    };
75  modifier_map Mod5   { <LALT> };
76};
77
78// using the level(switch) map, the right Control key temporarily
79// chooses the third shift level (until it is released).
80partial modifier_keys
81xkb_symbols "switch" {
82  key <RCTL> {
83    type[Group1]="ONE_LEVEL",
84    symbols[Group1] = [ ISO_Level3_Shift ]
85    };
86  modifier_map Mod5   { ISO_Level3_Shift };
87};
88
89// using the level(menu_switch) map, the Menu key temporarily
90// chooses the third shift level (until it is released).
91partial modifier_keys
92xkb_symbols "menu_switch" {
93  key <MENU> {
94    type[Group1]="ONE_LEVEL",
95    symbols[Group1] = [ ISO_Level3_Shift ]
96    };
97  modifier_map Mod5   { ISO_Level3_Shift };
98};
99
100// using the level3(win_switch) map, the either Windows' logo key
101// temporarily chooses the third shift level.
102partial modifier_keys
103xkb_symbols "win_switch" {
104  include "level3(lwin_switch)"
105  include "level3(rwin_switch)"
106};
107
108// using the level3(lwin_switch) map, the left Windows' logo key
109// temporarily chooses the third shift level.
110partial modifier_keys
111xkb_symbols "lwin_switch" {
112  key <LWIN> {
113    type[Group1]="ONE_LEVEL",
114    symbols[Group1] = [ ISO_Level3_Shift ]
115    };
116  modifier_map Mod5   { ISO_Level3_Shift };
117};
118
119// using the level(rwin_switch) map, the right Windows' logo key
120// temporarily chooses the third shift level.  If you use this map,
121// you should define your keyboard as pc101 or pc102 instead of pc104
122// or pc105.
123partial modifier_keys
124xkb_symbols "rwin_switch" {
125  key <RWIN> {
126    type[Group1]="ONE_LEVEL",
127    symbols[Group1] = [ ISO_Level3_Shift ]
128    };
129  modifier_map Mod5   { ISO_Level3_Shift };
130};
131
132// using the level3(enter_switch) map, the Enter key on the keypad
133// temporarily chooses the third shift level.  This is especially
134// useful for Mac laptops which miss the right Alt key.
135partial modifier_keys
136xkb_symbols "enter_switch" {
137  key <KPEN> {
138    type[Group1]="ONE_LEVEL",
139    symbols[Group1] = [ ISO_Level3_Shift ]
140    };
141  modifier_map Mod5   { ISO_Level3_Shift };
142};
143
144partial modifier_keys
145xkb_symbols "caps_switch" {
146  key <CAPS> {
147    type[Group1]="ONE_LEVEL",
148    symbols[Group1] = [ ISO_Level3_Shift ]
149  };
150  modifier_map Mod5   { ISO_Level3_Shift };
151};
152
153partial modifier_keys
154xkb_symbols "bksl_switch" {
155  key <BKSL> {
156    type[Group1]="ONE_LEVEL",
157    symbols[Group1] = [ ISO_Level3_Shift ]
158  };
159  modifier_map Mod5   { ISO_Level3_Shift };
160};
161
162partial modifier_keys
163xkb_symbols "lsgt_switch" {
164  key <LSGT> {
165    type[Group1]="ONE_LEVEL",
166    symbols[Group1] = [ ISO_Level3_Shift ]
167  };
168  modifier_map Mod5   { ISO_Level3_Shift };
169};
170
171partial modifier_keys
172xkb_symbols "caps_switch_latch" {
173  key <CAPS> {
174    type[Group1]="THREE_LEVEL",
175    symbols[Group1] = [ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Latch ]
176  };
177  modifier_map Mod5   { ISO_Level3_Shift };
178};
179
180partial modifier_keys
181xkb_symbols "bksl_switch_latch" {
182  key <BKSL> {
183    type[Group1]="THREE_LEVEL",
184    symbols[Group1] = [ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Latch ]
185  };
186  modifier_map Mod5   { ISO_Level3_Shift };
187};
188
189partial modifier_keys
190xkb_symbols "lsgt_switch_latch" {
191  key <LSGT> {
192    type[Group1]="THREE_LEVEL",
193    symbols[Group1] = [ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Latch ]
194  };
195  modifier_map Mod5   { ISO_Level3_Shift };
196};
197