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