summaryrefslogtreecommitdiff
path: root/symbols/level3
blob: 2f5575c6254f69e06b86e68eed7744dbc0b14b53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
// these variants assign various XKB keycodes to ISO_Level3_Shift so that
// the third shift level can be reached
//

// Ensure a mapping to a real modifier for LevelThree
partial modifier_keys
xkb_symbols "modifier_mapping" {
  key.type[Group1] = "ONE_LEVEL";

  replace key <LVL3> {
    symbols[Group1] = [ ISO_Level3_Shift ]
  };
  modifier_map Mod5 { <LVL3> };
};

// the default behavior is for the right Alt key (AltGr) to generate the
// third engraved symbol
default partial modifier_keys
xkb_symbols "ralt_switch" {
  key <RALT> {
    type[Group1]="ONE_LEVEL",
    symbols[Group1] = [ ISO_Level3_Shift ]
    };
  include "level3(modifier_mapping)"
};

// Right Alt key never chooses 3rd level.
// This option attempts to undo the effect of a layout's
// including ralt_switch.  You may also want to select another
// level3 option that maps the level3 shift to some other key.
partial modifier_keys
xkb_symbols "ralt_alt" {
  key <RALT> { 
    type[Group1]="TWO_LEVEL",
    type[Group2]="TWO_LEVEL",
    type[Group3]="TWO_LEVEL",
    type[Group4]="TWO_LEVEL",
    symbols[Group1] = [ Alt_R, Meta_R ], 
    symbols[Group2] = [ Alt_R, Meta_R ], 
    symbols[Group3] = [ Alt_R, Meta_R ], 
    symbols[Group4] = [ Alt_R, Meta_R ]
    };
  modifier_map Mod1    { <RALT> };
};

partial modifier_keys
xkb_symbols "ralt_switch_multikey" {
  key <RALT> {
    type[Group1]="TWO_LEVEL",
    symbols[Group1] = [ ISO_Level3_Shift, Multi_key ]
    };
  include "level3(modifier_mapping)"
};

// special case or right Alt switch - for use with grp:alts_toggle
//
partial hidden modifier_keys
xkb_symbols "ralt_switch_for_alts_toggle" {
 virtual_modifiers LAlt, AlGr;
  key <LALT> {
    type[Group1]="PC_RALT_LEVEL2",
    symbols[Group1] = [ Alt_L,  ISO_Prev_Group,  ISO_Prev_Group ],
    virtualMods= LAlt
  };
  key <RALT> {
    type[Group1]="PC_ALT_LEVEL2",
    symbols[Group1] = [ ISO_Level3_Shift, ISO_Next_Group ],
    virtualMods= AltGr
  };
  include "level3(modifier_mapping)"
};

// using the level(alt_switch) map, either Alt key temporarily chooses
// the third shift level.  (Mostly be used to imitate Mac OS functionality.)
partial modifier_keys
xkb_symbols "alt_switch" {
  include "level3(lalt_switch)"
  include "level3(ralt_switch)"
};

partial modifier_keys
xkb_symbols "lalt_switch" {
  key <LALT> {
    type[Group1]="ONE_LEVEL",
    symbols[Group1] = [ ISO_Level3_Shift ]
    };
  include "level3(modifier_mapping)"
};

// using the level(switch) map, the right Control key temporarily
// chooses the third shift level (until it is released).
partial modifier_keys
xkb_symbols "switch" {
  key <RCTL> {
    type[Group1]="ONE_LEVEL",
    symbols[Group1] = [ ISO_Level3_Shift ]
    };
  include "level3(modifier_mapping)"
};

// using the level(menu_switch) map, the Menu key temporarily
// chooses the third shift level (until it is released).
partial modifier_keys
xkb_symbols "menu_switch" {
  key <MENU> {
    type[Group1]="ONE_LEVEL",
    symbols[Group1] = [ ISO_Level3_Shift ]
    };
  include "level3(modifier_mapping)"
};

// using the level3(win_switch) map, the either Windows' logo key
// temporarily chooses the third shift level.
partial modifier_keys
xkb_symbols "win_switch" {
  include "level3(lwin_switch)"
  include "level3(rwin_switch)"
};

// using the level3(lwin_switch) map, the left Windows' logo key
// temporarily chooses the third shift level.
partial modifier_keys
xkb_symbols "lwin_switch" {
  key <LWIN> {
    type[Group1]="ONE_LEVEL",
    symbols[Group1] = [ ISO_Level3_Shift ]
    };
  include "level3(modifier_mapping)"
};

// using the level(rwin_switch) map, the right Windows' logo key
// temporarily chooses the third shift level.  If you use this map,
// you should define your keyboard as pc101 or pc102 instead of pc104
// or pc105.
partial modifier_keys
xkb_symbols "rwin_switch" {
  key <RWIN> {
    type[Group1]="ONE_LEVEL",
    symbols[Group1] = [ ISO_Level3_Shift ]
    };
  include "level3(modifier_mapping)"
};

// using the level3(enter_switch) map, the Enter key on the keypad
// temporarily chooses the third shift level.  This is especially
// useful for Mac laptops which miss the right Alt key.
partial modifier_keys
xkb_symbols "enter_switch" {
  key <KPEN> {
    type[Group1]="ONE_LEVEL",
    symbols[Group1] = [ ISO_Level3_Shift ]
    };
  include "level3(modifier_mapping)"
};

partial modifier_keys
xkb_symbols "caps_switch" {
  key <CAPS> {
    type[Group1]="ONE_LEVEL",
    symbols[Group1] = [ ISO_Level3_Shift ]
  };
  include "level3(modifier_mapping)"
};

partial modifier_keys
xkb_symbols "bksl_switch" {
  key <BKSL> {
    type[Group1]="ONE_LEVEL",
    symbols[Group1] = [ ISO_Level3_Shift ]
  };
  include "level3(modifier_mapping)"
};

partial modifier_keys
xkb_symbols "lsgt_switch" {
  key <LSGT> {
    type[Group1]="ONE_LEVEL",
    symbols[Group1] = [ ISO_Level3_Shift ]
  };
  include "level3(modifier_mapping)"
};

partial modifier_keys
xkb_symbols "caps_switch_latch" {
  key <CAPS> {
    type[Group1]="THREE_LEVEL",
    symbols[Group1] = [ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Latch ]
  };
  include "level3(modifier_mapping)"
};

partial modifier_keys
xkb_symbols "bksl_switch_latch" {
  key <BKSL> {
    type[Group1]="THREE_LEVEL",
    symbols[Group1] = [ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Latch ]
  };
  include "level3(modifier_mapping)"
};

partial modifier_keys
xkb_symbols "lsgt_switch_latch" {
  key <LSGT> {
    type[Group1]="THREE_LEVEL",
    symbols[Group1] = [ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Latch ]
  };
  include "level3(modifier_mapping)"
};