added Nigerian, b.fd.o#8467
[xorg/xkeyboard-config] / symbols / keypad
1 // $XKeyboardConfig$
2 // $Xorg: keypad,v 1.3 2000/08/17 19:54:43 cpqbld Exp $
3
4 partial hidden keypad_keys
5 xkb_symbols "overlay" {
6     include "keypad(overlay1)"
7 };
8
9 partial hidden keypad_keys
10 xkb_symbols "overlay1" {
11
12     // Begin "Keypad" section
13
14     key  <KP7> {        [  KP_Home      ],      overlay1=<KO7>  };
15     key  <KP8> {        [  KP_Up        ],      overlay1=<KO8>  };
16     key  <KP9> {        [  KP_Prior     ],      overlay1=<KO9>  };
17
18     key  <KP4> {        [  KP_Left      ],      overlay1=<KO4>  };
19     key  <KP5> {        [  KP_Begin     ],      overlay1=<KO5>  };
20     key  <KP6> {        [  KP_Right     ],      overlay1=<KO6>  };
21
22     key  <KP1> {        [  KP_End       ],      overlay1=<KO1>  };
23     key  <KP2> {        [  KP_Down      ],      overlay1=<KO2>  };
24     key  <KP3> {        [  KP_Next      ],      overlay1=<KO3>  };
25
26     key  <KP0> {        [  KP_Insert    ],      overlay1=<KO0>  };
27     key <KPDL> {        [  KP_Delete    ],      overlay1=<KODL> };
28
29     key  <KO7> {        [  KP_7 ]       };
30     key  <KO8> {        [  KP_8 ]       };
31     key  <KO9> {        [  KP_9 ]       };
32
33     key  <KO4> {        [  KP_4 ]       };
34     key  <KO5> {        [  KP_5 ]       };
35     key  <KO6> {        [  KP_6 ]       };
36
37     key  <KO1> {        [  KP_1 ]       };
38     key  <KO2> {        [  KP_2 ]       };
39     key  <KO3> {        [  KP_3 ]       };
40
41     key  <KO0> {        [  KP_0 ]       };
42     key <KODL> {        [  KP_Decimal ] };
43
44     // End "Keypad" section
45 };
46
47 partial hidden keypad_keys
48 xkb_symbols "overlay2" {
49
50     // Begin "Keypad" section
51
52     key  <KP7> {        [  KP_Home      ],      overlay2=<KO7>  };
53     key  <KP8> {        [  KP_Up        ],      overlay2=<KO8>  };
54     key  <KP9> {        [  KP_Prior     ],      overlay2=<KO9>  };
55
56     key  <KP4> {        [  KP_Left      ],      overlay2=<KO4>  };
57     key  <KP5> {        [  KP_Begin     ],      overlay2=<KO5>  };
58     key  <KP6> {        [  KP_Right     ],      overlay2=<KO6>  };
59
60     key  <KP1> {        [  KP_End       ],      overlay2=<KO1>  };
61     key  <KP2> {        [  KP_Down      ],      overlay2=<KO2>  };
62     key  <KP3> {        [  KP_Next      ],      overlay2=<KO3>  };
63
64     key  <KP0> {        [  KP_Insert    ],      overlay2=<KO0>  };
65     key <KPDL> {        [  KP_Delete    ],      overlay2=<KODL> };
66
67     key  <KO7> {        [  KP_7 ]       };
68     key  <KO8> {        [  KP_8 ]       };
69     key  <KO9> {        [  KP_9 ]       };
70
71     key  <KO4> {        [  KP_4 ]       };
72     key  <KO5> {        [  KP_5 ]       };
73     key  <KO6> {        [  KP_6 ]       };
74
75     key  <KO1> {        [  KP_1 ]       };
76     key  <KO2> {        [  KP_2 ]       };
77     key  <KO3> {        [  KP_3 ]       };
78
79     key  <KO0> {        [  KP_0 ]       };
80     key <KODL> {        [  KP_Decimal ] };
81
82     // End "Keypad" section
83 };
84
85 partial hidden default keypad_keys
86 xkb_symbols "x11" {
87 // Ungrab cancels server/keyboard/pointer grabs
88     key <KPDV> {
89         type="CTRL+ALT",
90         symbols[Group1]= [ KP_Divide,   XF86_Ungrab ]
91     };
92
93 // ClsGrb kills whichever client has a grab in effect
94     key <KPMU> {
95         type="CTRL+ALT",
96         symbols[Group1]= [ KP_Multiply, XF86_ClearGrab ]
97     };
98
99 // -VMode switches to the previous video mode
100     key <KPSU> {
101         type="CTRL+ALT",
102         symbols[Group1]= [ KP_Subtract, XF86_Prev_VMode ]
103     };
104
105     key  <KP7> {        [  KP_Home,     KP_7    ]       };
106     key  <KP8> {        [  KP_Up,       KP_8    ]       };
107     key  <KP9> {        [  KP_Prior,    KP_9    ]       };
108
109 // +VMode switches to the next video mode
110     key <KPAD> {
111         type="CTRL+ALT",
112         symbols[Group1]= [ KP_Add,      XF86_Next_VMode ]
113     };
114
115     key  <KP4> {        [  KP_Left,     KP_4    ]       };
116     key  <KP5> {        [  KP_Begin,    KP_5    ]       };
117     key  <KP6> {        [  KP_Right,    KP_6    ]       };
118
119     key  <KP1> {        [  KP_End,      KP_1    ]       };
120     key  <KP2> {        [  KP_Down,     KP_2    ]       };
121     key  <KP3> {        [  KP_Next,     KP_3    ]       };
122     key <KPEN> {        [       KP_Enter        ]       };
123     key <KPEQ> {        [       KP_Equal        ]       };
124
125     key  <KP0> {        [  KP_Insert,   KP_0    ]       };
126     key <KPDL> {        [  KP_Delete,   KP_Decimal ]    };
127 };
128
129 // Some national standards use comma on the keypad instead of decimal dot
130 partial keypad_keys
131 xkb_symbols "comma" {
132     key <KPDL> {       [ KP_Delete, KP_Separator ] };
133 };
134
135 // Default is decimal dot
136 partial keypad_keys
137 xkb_symbols "dot" {
138     key <KPDL> {       [ KP_Delete, KP_Decimal ] };
139 };
140
141
142 // Legacy PC keypad definition
143 // Copyright © 2006 Nicolas Mailhot <nicolas.mailhot @ laposte.net>
144 keypad_keys
145 xkb_symbols "legacy" {
146
147     include "keypad(core)"
148     include "keypad(legacymath)"
149     include "keypad(legacynumber)"
150 };
151
152
153 // Complete new keypad definition
154 // Copyright © 2006 Nicolas Mailhot <nicolas.mailhot @ laposte.net>
155 keypad_keys
156 xkb_symbols "oss" {
157
158     include "keypad(core)"
159     include "keypad(ossmath)"
160     include "keypad(ossnumber)"
161 };
162
163
164 // Latin9 restriction of new keypad definition
165 // Copyright © 2006 Nicolas Mailhot <nicolas.mailhot @ laposte.net>
166 keypad_keys
167 xkb_symbols "oss_latin9" {
168
169     include "keypad(core)"
170     include "keypad(ossmath_latin9)"
171     include "keypad(legacynumber)"
172
173     key <KPDL> { type="FOUR_LEVEL_MIXED_KEYPAD",
174                  [ KP_Delete,             period, comma, nobreakspace ] }; // <delete> . , ⍽ (no-break space)
175 };
176
177 // Keypad keys nobody changes
178 // Copyright © 2006 Nicolas Mailhot <nicolas.mailhot @ laposte.net>
179 partial keypad_keys
180 xkb_symbols "core" {
181
182     modifier_map Mod2 { Num_Lock };
183
184     key <NMLK> { [ Num_Lock, Pointer_EnableKeys ] };
185     key <KPEN> { [ KP_Enter                     ] };
186     key <KPEQ> { [ KP_Equal                     ] };
187 };
188
189
190 // Legacy keypad math area
191 // Copyright © 2006 Nicolas Mailhot <nicolas.mailhot @ laposte.net>
192 //
193 // ┏━━━━━┱─────┬─────┬─────┐
194 // ┃Num  ┃ ₁   │ ₂   │ ₃   │ ₁ <XF86_Ungrab>
195 // ┃Lock⇭┃ /   │ *   │ -   │ ₂ <XF86_ClearGrab>
196 // ┡━━━━━╃─────┼─────┼─────┤ ₃ <XF86_Prev_VMode>
197 //                   │ ₄   │ ₄ <XF86_Next_VMode>
198 //                   │     │
199 //                   ┤     │ 1 None
200 //                   │     │ 2 Ctrl+Alt
201 //                   │ +   │
202 //                   ╆━━━━━┪
203 partial keypad_keys
204 xkb_symbols "legacymath" {
205
206     key.type[Group1]="CTRL+ALT" ;
207
208     key <KPDV> { [   KP_Divide,     XF86_Ungrab ] }; // / <XF86_Ungrab>
209     key <KPMU> { [ KP_Multiply,  XF86_ClearGrab ] }; // * <XF86_ClearGrab>
210     key <KPSU> { [ KP_Subtract, XF86_Prev_VMode ] }; // - <XF86_Prev_VMode>
211
212     key <KPAD> { [      KP_Add, XF86_Next_VMode ] }; // + <XF86_Next_VMode>
213
214 };
215
216
217 // Keypad math area with non-CS operators
218 // Copyright © 2006 Nicolas Mailhot <nicolas.mailhot @ laposte.net>
219 //
220 // ┏━━━━━┱─────┬─────┬─────┐
221 // ┃Num  ┃ ∕ ₁ │ . ₂ │ − ₃ │ ₁ <XF86_Ungrab>
222 // ┃Lock⇭┃ / ÷ │ * × │ - − │ ₂ <XF86_ClearGrab>
223 // ┡━━━━━╃─────┼─────┼─────┤ ₃ <XF86_Prev_VMode>
224 //                   │ + ₄ │ ₄ <XF86_Next_VMode>
225 //                   │     │
226 //                   ┤     │ 1 None
227 //                   │     │ 2 Level3 ⇮
228 //                   │ + + │ 3 Shift+Level3 ⇧⇮
229 //                   ╆━━━━━┪ 4 Ctrl+Alt
230 partial keypad_keys
231 xkb_symbols "ossmath" {
232
233     key.type[Group1]="FOUR_LEVEL_X" ;
234
235     key <KPDV> { [   KP_Divide, 0x1002215, 0x10000F7,     XF86_Ungrab ] }; // / ∕ ÷     <XF86_Ungrab>
236     key <KPMU> { [ KP_Multiply, 0x10022C5, 0x10000D7,  XF86_ClearGrab ] }; // * ⋅ ×  <XF86_ClearGrab>
237     key <KPSU> { [ KP_Subtract, 0x1002212, 0x1002212, XF86_Prev_VMode ] }; // - − − <XF86_Prev_VMode>
238
239     key <KPAD> { [      KP_Add, 0x100002B, 0x100002B, XF86_Next_VMode ] }; // + + + <XF86_Next_VMode>
240
241 };
242
243
244 // Keypad math area with non-CS operators, restricted to latin9
245 // Copyright © 2006 Nicolas Mailhot <nicolas.mailhot @ laposte.net>
246 //
247 // ┏━━━━━┱─────┬─────┬─────┐
248 // ┃Num  ┃ / ₁ │ · ₂ │ - ₃ │ ₁ <XF86_Ungrab>
249 // ┃Lock⇭┃ / ÷ │ * × │ - - │ ₂ <XF86_ClearGrab>
250 // ┡━━━━━╃─────┼─────┼─────┤ ₃ <XF86_Prev_VMode>
251 //                   │ + ₄ │ ₄ <XF86_Next_VMode>
252 //                   │     │
253 //                   ┤     │ 1 None
254 //                   │     │ 2 Level3 ⇮
255 //                   │ + + │ 3 Shift+Level3 ⇧⇮
256 //                   ╆━━━━━┪ 4 Ctrl+Alt
257 partial keypad_keys
258 xkb_symbols "ossmath_latin9" {
259
260     key.type[Group1]="FOUR_LEVEL_X";
261
262     key <KPDV> { [   KP_Divide,          slash, division,     XF86_Ungrab ] }; // / / ÷     <XF86_Ungrab>
263     key <KPMU> { [ KP_Multiply, periodcentered, multiply,  XF86_ClearGrab ] }; // * · ×  <XF86_ClearGrab>
264     key <KPSU> { [ KP_Subtract,          minus,    minus, XF86_Prev_VMode ] }; // - - - <XF86_Prev_VMode>
265
266     key <KPAD> { [      KP_Add,           plus,     plus, XF86_Next_VMode ] }; // + + + <XF86_Next_VMode>
267 };
268
269
270 // Legacy keypad number area
271 // Copyright © 2006 Nicolas Mailhot <nicolas.mailhot @ laposte.net>
272 //
273 // ┏━━━━━┱                   ⇱ Home
274 // ┃Num  ┃                   ⇲ End
275 // ┃Lock⇭┃                   ⇞ Page up
276 // ┡━━━━━╃─────┼─────┼       ⇟ Page down
277 // │ 7   │ 8   │ 9   │       ⇞ Page up
278 // │ ⇱   │ ⇧   │ ⇞   │       ⎀ Insert
279 // ├─────┼─────┼─────┤       ␥ Delete
280 // │ 4   │ 5   │ 6   │       ⇦⇧⇨⇩ Directions
281 // │ ⇦   │     │ ⇨   │
282 // ├─────┼─────┼─────╆━━━━━┪
283 // │ 1   │ 2   │ 3   ┃Enter┃
284 // │ ⇲   │ ⇩   │ ⇟   ┃  ⎆  ┃ 1 None
285 // ├─────┴─────┼─────┨     ┃ 2 Num Lock ⇭
286 // │ 0         │ .   ┃     ┃
287 // │ ⎀         │ ␥   ┃     ┃
288 // └───────────┴─────┺━━━━━┛
289 partial keypad_keys
290 xkb_symbols "legacynumber" {
291
292     key.type[Group1]="KEYPAD" ;
293
294     key <KP7>  { [   KP_Home,       KP_7 ] }; //   <home> 7
295     key <KP8>  { [     KP_Up,       KP_8 ] }; //     <up> 8
296     key <KP9>  { [  KP_Prior,       KP_9 ] }; //  <prior> 9
297  
298     key <KP4>  { [   KP_Left,       KP_4 ] }; //   <left> 4
299     key <KP5>  { [  KP_Begin,       KP_5 ] }; //  <begin> 5
300     key <KP6>  { [  KP_Right,       KP_6 ] }; //  <right> 6
301
302     key <KP1>  { [    KP_End,       KP_1 ] }; //    <end> 1
303     key <KP2>  { [   KP_Down,       KP_2 ] }; //   <down> 2
304     key <KP3>  { [   KP_Next,       KP_3 ] }; //   <next> 3
305
306     key <KP0>  { [ KP_Insert,       KP_0 ] }; // <insert> 0
307     key <KPDL> { [ KP_Delete, KP_Decimal ] }; // <delete> .
308 };
309
310
311 // Keypad number area with arrow symbols
312 // Copyright © 2006 Nicolas Mailhot <nicolas.mailhot @ laposte.net>
313 //
314 // ┏━━━━━┱                   ⇱ Home
315 // ┃Num  ┃                   ⇲ End
316 // ┃Lock⇭┃                   ⇞ Page up
317 // ┡━━━━━╃─────┼─────┼       ⇟ Page down
318 // │ 7 ⇖ │ 8 ⇑ │ 9 ⇗ │       ⇞ Page up
319 // │ ⇱ ↖ │ ⇧ ↑ │ ⇞ ↗ │       ⎀ Insert
320 // ├─────┼─────┼─────┤       ␥ Delete
321 // │ 4 ⇐ │ 5 ⇔ │ 6 ⇗ │       ⇦⇧⇨⇩ Directions
322 // │ ⇦ ← │   ↔ │ ⇨ ↗ │       ⍽ narrow no-break space
323 // ├─────┼─────┼─────╆━━━━━┪
324 // │ 1 ⇙ │ 2 ⇓ │ 3 ⇘ ┃Enter┃
325 // │ ⇲ ↙ │ ⇩ ↓ │ ⇟ ↘ ┃  ⎆  ┃ 1 None
326 // ├─────┴─────┼─────┨     ┃ 2 Num Lock ⇭
327 // │ 0       ⇕ │ . ⍽ ┃     ┃ 3 Level3 ⇮
328 // │ ⎀       ↕ │ ␥ , ┃     ┃ 4 Shift+Level3 ⇧⇮
329 // └───────────┴─────┺━━━━━┛
330 partial keypad_keys
331 xkb_symbols "ossnumber" {
332
333     key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ;
334
335     key <KP7>  { [   KP_Home,   KP_7, 0x1002196, 0x10021D6 ] }; //   <home> 7 ↖ ⇖
336     key <KP8>  { [     KP_Up,   KP_8, 0x1002191, 0x10021D1 ] }; //     <up> 8 ↑ ⇑
337     key <KP9>  { [  KP_Prior,   KP_9, 0x1002197, 0x10021D7 ] }; //  <prior> 9 ↗ ⇗
338  
339     key <KP4>  { [   KP_Left,   KP_4, 0x1002190, 0x10021D0 ] }; //   <left> 4 ← ⇐
340     key <KP5>  { [  KP_Begin,   KP_5, 0x1002194, 0x10021D4 ] }; //  <begin> 5 ↔ ⇔
341     key <KP6>  { [  KP_Right,   KP_6, 0x1002192, 0x10021D2 ] }; //  <right> 6 → ⇒
342
343     key <KP1>  { [    KP_End,   KP_1, 0x1002199, 0x10021D9 ] }; //    <end> 1 ↙ ⇙
344     key <KP2>  { [   KP_Down,   KP_2, 0x1002193, 0x10021D3 ] }; //   <down> 2 ↓ ⇓
345     key <KP3>  { [   KP_Next,   KP_3, 0x1002198, 0x10021D8 ] }; //   <next> 3 ↘ ⇘
346
347     key <KP0>  { [ KP_Insert,   KP_0, 0x1002195, 0x10021D5 ] }; // <insert> 0 ↕ ⇕
348     // We could use KP_Decimal and KP_Separator but we do not want the locale
349     // decimal and separator symbol but locale-insensitive dot and comma
350     key <KPDL> { [ KP_Delete, period,     comma, 0x100202F ] }; // <delete> . , ⍽ (narrow no-break space)
351 };