Hide ClearGrab/CloseGrabs actions behind an option
[xorg/xkeyboard-config] / symbols / level3
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
7 default partial modifier_keys
8 xkb_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.
20 partial modifier_keys
21 xkb_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
35 partial modifier_keys
36 xkb_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 //
45 partial hidden modifier_keys
46 xkb_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.)
63 partial modifier_keys
64 xkb_symbols "alt_switch" {
65   include "level3(lalt_switch)"
66   include "level3(ralt_switch)"
67 };
68
69 partial modifier_keys
70 xkb_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).
80 partial modifier_keys
81 xkb_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).
91 partial modifier_keys
92 xkb_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.
102 partial modifier_keys
103 xkb_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.
110 partial modifier_keys
111 xkb_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.
123 partial modifier_keys
124 xkb_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.
135 partial modifier_keys
136 xkb_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
144 partial modifier_keys
145 xkb_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
153 partial modifier_keys
154 xkb_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
162 partial modifier_keys
163 xkb_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
171 partial modifier_keys
172 xkb_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
180 partial modifier_keys
181 xkb_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
189 partial modifier_keys
190 xkb_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 };