Fix "mac style" numpad
[xorg/xkeyboard-config] / types / caps
1 // CapsLock uses internal capitalization rules
2 // Shift "pauses" CapsLock
3 partial xkb_types "internal" {
4     type "ALPHABETIC" {
5         modifiers = Shift+Lock;
6         map[Shift] = Level2;
7         preserve[Lock] = Lock;
8         level_name[Level1] = "Base";
9         level_name[Level2] = "Caps";
10     };
11
12     type "FOUR_LEVEL_ALPHABETIC" {
13         modifiers = Shift+Lock+LevelThree;
14         map[None] = Level1;
15         map[Shift] = Level2;
16         preserve[Lock] = Lock;
17         map[LevelThree] = Level3;
18         map[Shift+LevelThree] = Level4;
19         map[Lock+LevelThree] =  Level3;
20         map[Lock+Shift+LevelThree] = Level3;
21         preserve[Lock+LevelThree] = Lock;
22         level_name[Level1] = "Base";
23         level_name[Level2] = "Shift";
24         level_name[Level3] = "Alt Base";
25         level_name[Level4] = "Shift Alt";
26     };
27
28     type "FOUR_LEVEL_SEMIALPHABETIC" {
29         modifiers = Shift+Lock+LevelThree;
30         map[None] = Level1;
31         map[Shift] = Level2;
32         preserve[Lock] = Lock;
33         map[LevelThree] = Level3;
34         map[Shift+LevelThree] = Level4;
35         map[Lock+LevelThree] =  Level3;
36         map[Lock+Shift+LevelThree] = Level4;
37         preserve[Lock+LevelThree] = Lock;
38         preserve[Lock+Shift+LevelThree] = Lock;
39         level_name[Level1] = "Base";
40         level_name[Level2] = "Shift";
41         level_name[Level3] = "Alt Base";
42         level_name[Level4] = "Shift Alt";
43     };
44 };
45 // CapsLock uses internal capitalization rules
46 // Shift doesn't cancel CapsLock
47 partial xkb_types "internal_nocancel" {
48     type "ALPHABETIC" {
49         modifiers = Shift;
50         map[Shift] = Level2;
51         level_name[Level1] = "Base";
52         level_name[Level2] = "Caps";
53     };
54
55     type "FOUR_LEVEL_ALPHABETIC" {
56         modifiers = Shift+LevelThree;
57         map[None] = Level1;
58         map[Shift] = Level2;
59         map[LevelThree] = Level3;
60         map[Shift+LevelThree] = Level4;
61         level_name[Level1] = "Base";
62         level_name[Level2] = "Shift";
63         level_name[Level3] = "Alt Base";
64         level_name[Level4] = "Shift Alt";
65     };
66
67     type "FOUR_LEVEL_SEMIALPHABETIC" {
68         // the same as FOUR_LEVEL_ALPHABETIC
69         modifiers = Shift+LevelThree;
70         map[None] = Level1;
71         map[Shift] = Level2;
72         map[LevelThree] = Level3;
73         map[Shift+LevelThree] = Level4;
74         level_name[Level1] = "Base";
75         level_name[Level2] = "Shift";
76         level_name[Level3] = "Alt Base";
77         level_name[Level4] = "Shift Alt";
78     };
79 };
80 // CapsLock acts as Shift with locking
81 // Shift "pauses" CapsLock
82 partial xkb_types "shift" {
83     type "ALPHABETIC" {
84         modifiers = Shift+Lock;
85         map[Shift] = Level2;
86         map[Lock] = Level2;
87         level_name[Level1] = "Base";
88         level_name[Level2] = "Caps";
89     };
90
91     type "FOUR_LEVEL_ALPHABETIC" {
92         modifiers = Shift+Lock+LevelThree;
93         map[None] = Level1;
94         map[Shift] = Level2;
95         map[Lock]  = Level2;
96         map[LevelThree] = Level3;
97         map[Shift+LevelThree] = Level4;
98         map[Lock+LevelThree] =  Level4;
99         map[Shift+Lock+LevelThree] =  Level3;
100         level_name[Level1] = "Base";
101         level_name[Level2] = "Shift";
102         level_name[Level3] = "Alt Base";
103         level_name[Level4] = "Shift Alt";
104     };
105
106     type "FOUR_LEVEL_SEMIALPHABETIC" {
107         modifiers = Shift+Lock+LevelThree;
108         map[None] = Level1;
109         map[Shift] = Level2;
110         map[Lock]  = Level2;
111         map[LevelThree] = Level3;
112         map[Shift+LevelThree] = Level4;
113         map[Lock+LevelThree] =  Level3;
114         map[Lock+Shift+LevelThree] = Level4;
115         preserve[Lock+LevelThree] = Lock;
116         preserve[Lock+Shift+LevelThree] = Lock;
117         level_name[Level1] = "Base";
118         level_name[Level2] = "Shift";
119         level_name[Level3] = "Alt Base";
120         level_name[Level4] = "Shift Alt";
121     };
122 };
123 // CapsLock acts as Shift with locking
124 // Shift doesn't cancel CapsLock
125 partial xkb_types "shift_nocancel" {
126     type "ALPHABETIC" {
127         modifiers = Shift+Lock;
128         map[Shift] = Level2;
129         map[Lock] = Level2;
130         map[Shift+Lock] = Level2;
131         level_name[Level1] = "Base";
132         level_name[Level2] = "Caps";
133     };
134
135     type "FOUR_LEVEL_ALPHABETIC" {
136         modifiers = Shift+Lock+LevelThree;
137         map[None] =  Level1;
138         map[Shift] = Level2;
139         map[Lock] =  Level2;
140         map[Shift+Lock] = Level2;
141         map[LevelThree] = Level3;
142         map[Shift+LevelThree] = Level4;
143         map[Lock+LevelThree] =  Level4;
144         map[Shift+Lock+LevelThree] = Level4;
145         level_name[Level1] = "Base";
146         level_name[Level2] = "Shift";
147         level_name[Level3] = "Alt Base";
148         level_name[Level4] = "Shift Alt";
149     };
150
151     type "FOUR_LEVEL_SEMIALPHABETIC" {
152         modifiers = Shift+Lock+LevelThree;
153         map[None] =  Level1;
154         map[Shift] = Level2;
155         map[Lock] =  Level2;
156         map[Shift+Lock] = Level2;
157         map[LevelThree] = Level3;
158         map[Shift+LevelThree] = Level4;
159         map[Lock+LevelThree] =  Level3;
160         map[Lock+Shift+LevelThree] = Level4;
161         preserve[Lock+LevelThree] = Lock;
162         preserve[Lock+Shift+LevelThree] = Lock;
163         level_name[Level1] = "Base";
164         level_name[Level2] = "Shift";
165         level_name[Level3] = "Alt Base";
166         level_name[Level4] = "Shift Alt";
167     };
168 };