2 partial default xkb_types "pc" {
4 modifiers = Shift+NumLock;
8 map[Shift+NumLock] = Level1;
9 level_name[Level1] = "Base";
10 level_name[Level2] = "Number";
12 include "extra(keypad)"
15 // On Mac keypads, level 1 and 2 are swapped
16 partial xkb_types "mac" {
18 modifiers = Shift+NumLock;
21 map[NumLock] = Level1;
22 map[Shift+NumLock] = Level2;
23 level_name[Level2] = "Base";
24 level_name[Level1] = "Number";
26 include "extra(mac_keypad)"
29 partial xkb_types "microsoft" {
31 modifiers = Shift+NumLock;
33 preserve[Shift] = Shift;
34 map[NumLock] = Level2;
35 level_name[Level1] = "Base";
36 level_name[Level2] = "Number";
38 include "extra(keypad)"
41 // Swiss-German style numeric keypad: Shift and NumLock operates as
42 // two independent modifiers; however, since we want shift state for
43 // the cursor keys, only three levels are used from the key mappings.
44 // Closest type is actually FOUR_LEVEL_X, but most numpad layouts uses
45 // FOUR_LEVEL_MIXED_KEYPAD so that's the one we are going to override.
46 partial xkb_types "shift3" {
47 type "FOUR_LEVEL_MIXED_KEYPAD" {
48 modifiers = Shift+NumLock+Control+Alt;
50 // NumLock Off => navigate using cursor keys
53 // NumLock Off + Shift pressed => select using cursor keys
54 preserve[Shift] = Shift;
56 // NumLock On => decimal digits
57 map[NumLock] = Level2;
59 // NumLock On + Shift pressed => auxiliary symbols,
60 // e.g. hexadecimal digits
61 map[Shift+NumLock] = Level3;
63 // Ctrl + Alt, regardless of NumLock and Shift => command keys
64 map[Control+Alt] = Level4;
66 // reverse map from levels to modifiers
67 level_name[Level1] = "Base";
68 level_name[Level2] = "NumLock";
69 level_name[Level3] = "Shift+NumLock";
70 level_name[Level4] = "Ctrl+Alt";