level5 revision bb3a541c
1// These partial variants assign ISO_Level5_Shift to various XKB keycodes
2// so that the fifth shift level can be reached.
3
4// The right Ctrl key (while pressed) chooses the fifth shift level.
5partial modifier_keys
6xkb_symbols "rctrl_switch" {
7  key <RCTL> {
8    type[Group1]="ONE_LEVEL",
9    symbols[Group1] = [ ISO_Level5_Shift ]
10  };
11  include "level5(modifier_mapping)"
12};
13
14// The Less/Greater key (while pressed) chooses the fifth shift level.
15partial modifier_keys
16xkb_symbols "lsgt_switch" {
17  key <LSGT> {
18    type[Group1]="ONE_LEVEL",
19    symbols[Group1] = [ ISO_Level5_Shift ]
20  };
21  include "level5(modifier_mapping)"
22};
23
24// The right Alt key (while pressed) chooses the fifth shift level.
25partial modifier_keys
26xkb_symbols "ralt_switch" {
27  key <RALT> {
28    type[Group1]="ONE_LEVEL",
29    symbols[Group1] = [ ISO_Level5_Shift ]
30  };
31  include "level5(modifier_mapping)"
32};
33
34// The CapsLock key (while pressed) chooses the fifth shift level.
35partial modifier_keys
36xkb_symbols "caps_switch" {
37  key <CAPS> {
38    type[Group1]="ONE_LEVEL",
39    symbols[Group1] = [ ISO_Level5_Shift ]
40  };
41  include "level5(modifier_mapping)"
42};
43
44// The Menu key (while pressed) chooses the fifth shift level.
45partial modifier_keys
46xkb_symbols "menu_switch" {
47  key <MENU> {
48    type[Group1]="ONE_LEVEL",
49    symbols[Group1] = [ ISO_Level5_Shift ]
50  };
51  include "level5(modifier_mapping)"
52};
53
54// Ensure a mapping to a real modifier for LevelFive.
55partial modifier_keys
56xkb_symbols "modifier_mapping" {
57  replace key <MDSW> {
58    type[Group1] = "ONE_LEVEL",
59    symbols[Group1] = [ ISO_Level5_Shift ]
60  };
61  modifier_map Mod3 { <MDSW> };
62};
63
64
65// This adds the definitions needed to create a level5-lock behaviour, using
66// the real modifier NumLock as a lock indicator.
67// See also: types/level5 : EIGHT_LEVEL_LEVEL_FIVE_LOCK
68// See also: compat/level5(level5_lock)
69partial modifier_keys
70xkb_symbols "lock" {
71  key.type[Group1] = "ONE_LEVEL";
72  include "level5(modifier_mapping)"
73  replace key <HYPR> {
74    vmods = NumLock,
75    symbols[Group1] = [ NoSymbol ],
76    actions[Group1] = [ SetMods(modifiers=NumLock) ]
77  };
78  modifier_map Mod2 { <HYPR> };
79};
80
81// The following modifier keys are used to switch to the third shift level
82// and to set a corresponding lock, implemented as NumLock.
83
84partial modifier_keys
85xkb_symbols "lsgt_switch_lock" {
86  include "level5(lock)"
87  key <LSGT> {
88    type[Group1] = "EIGHT_LEVEL",
89    symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
90                        ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
91  };
92};
93
94partial modifier_keys
95xkb_symbols "lwin_switch_lock" {
96  include "level5(lock)"
97  key <LWIN> {
98    type[Group1] = "EIGHT_LEVEL",
99    symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
100                        ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
101  };
102};
103
104partial modifier_keys
105xkb_symbols "ralt_switch_lock" {
106  include "level5(lock)"
107  key <RALT> {
108    type[Group1] = "EIGHT_LEVEL",
109    symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
110                        ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
111  };
112};
113
114partial modifier_keys
115xkb_symbols "rwin_switch_lock" {
116  include "level5(lock)"
117  key <RWIN> {
118    type[Group1] = "EIGHT_LEVEL",
119    symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
120                        ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
121  };
122};
123
124partial modifier_keys
125xkb_symbols "lsgt_switch_lock_cancel" {
126  include "level5(lock)"
127  key <LSGT> {
128    type[Group1] = "EIGHT_LEVEL_LEVEL_FIVE_LOCK",
129    symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
130                        ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
131  };
132};
133
134partial modifier_keys
135xkb_symbols "lwin_switch_lock_cancel" {
136  include "level5(lock)"
137  key <LWIN> {
138    type[Group1] = "EIGHT_LEVEL_LEVEL_FIVE_LOCK",
139    symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
140                        ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
141  };
142};
143
144partial modifier_keys
145xkb_symbols "ralt_switch_lock_cancel" {
146  include "level5(lock)"
147  key <RALT> {
148    type[Group1] = "EIGHT_LEVEL_LEVEL_FIVE_LOCK",
149    symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
150                        ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
151  };
152};
153
154partial modifier_keys
155xkb_symbols "rwin_switch_lock_cancel" {
156  include "level5(lock)"
157  key <RWIN> {
158    type[Group1] = "EIGHT_LEVEL_LEVEL_FIVE_LOCK",
159    symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
160                        ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
161  };
162};
163