xref: /reactos/sdk/tools/kbdtool/data.c (revision 1734f297)
1 /*
2  * PROJECT:         ReactOS Build Tools [Keyboard Layout Compiler]
3  * LICENSE:         BSD - See COPYING.BSD in the top level directory
4  * FILE:            tools/kbdtool/data.c
5  * PURPOSE:         Internal Keyboard (Scancode/Virtual Key) Tables
6  * PROGRAMMERS:     ReactOS Foundation
7  */
8 
9 /* INCLUDES *******************************************************************/
10 
11 #include "kbdtool.h"
12 
13 /* GLOBALS ********************************************************************/
14 
15 /* Table of Virtual Key Names */
16 VKNAME VKName[] =
17 {
18     {0x08, "BACK"},
19     {0x03, "CANCEL"},
20     {0x1b, "ESCAPE"},
21     {0x0d, "RETURN"},
22     {0x20, "SPACE"},
23     {0x6e, "DECIMAL"},
24     {0xba, "OEM_1"},
25     {0xbb, "OEM_PLUS"},
26     {0xbc, "OEM_COMMA"},
27     {0xbd, "OEM_MINUS"},
28     {0xbe, "OEM_PERIOD"},
29     {0xbf, "OEM_2"},
30     {0xc0, "OEM_3"},
31     {0xdb, "OEM_4"},
32     {0xdc, "OEM_5"},
33     {0xdd, "OEM_6"},
34     {0xde, "OEM_7"},
35     {0xdf, "OEM_8"},
36     {0xe2, "OEM_102"},
37     {0xc1, "ABNT_C1"},
38     {0xc2, "ABNT_C2"},
39     {0x10, "SHIFT"},
40     {0xa0, "LSHIFT"},
41     {0xa1, "RSHIFT"},
42     {0x12, "MENU"},
43     {0xa4, "LMENU"},
44     {0xa5, "RMENU"},
45     {0x11, "CONTROL"},
46     {0xa2, "LCONTROL"},
47     {0xa3, "RCONTROL"},
48     {0x6c, "SEPARATOR"},
49     {0xe4, "ICO_00"},
50     {0x2e, "DELETE"},
51     {0x2d, "INSERT"},
52     {0xe5, "GROUPSHIFT"},
53     {0xe6, "RGROUPSHIFT"}
54 };
55 /* Table of modifiers */
56 VKNAME Modifiers[] =
57 {
58     {0x10, "KBDSHIFT"},
59     {0x11, "KBDCTRL"},
60     {0x12, "KBDALT"}
61 };
62 
63 /* Table of states */
64 PCHAR StateLabel[] =
65 {
66     "",
67     "Shift",
68     "  Ctrl",
69     "S+Ctrl",
70     "      Alt",
71     "Shift+Alt",
72     "  Ctl+Alt",
73     "S+Ctl+Alt",
74     "      X1      ",
75     "S+    X1      ",
76     "  C+  X1      ",
77     "S+C+  X1      ",
78     "    A+X1      ",
79     "S+  A+X1      ",
80     "  C+A+X1      ",
81     "S+C+A+X1      ",
82     "         X2   ",
83     "S+       X2   ",
84     "  C+     X2   ",
85     "S+C+     X2   ",
86     "    A+   X2   ",
87     "S+  A+   X2   ",
88     "  C+A+   X2   ",
89     "S+C+A+   X2   ",
90     "      X1+X2   ",
91     "S+    X1+X2   ",
92     "  C+  X1+X2   ",
93     "S+C+  X1+X2   ",
94     "    A+X1+X2   ",
95     "S+  A+X1+X2   ",
96     "  C+A+X1+X2   ",
97     "S+C+A+X1+X2   ",
98     "            X3",
99     "S+          X3",
100     "  C+        X3",
101     "S+C+        X3",
102     "    A+      X3",
103     "S+  A+      X3",
104     "  C+A+      X3",
105     "S+C+A+      X3",
106     "      X1+   X3",
107     "S+    X1+   X3",
108     "  C+  X1+   X3",
109     "S+C+  X1+   X3",
110     "    A+X1+   X3",
111     "S+  A+X1+   X3",
112     "  C+A+X1+   X3",
113     "S+C+A+X1+   X3",
114     "         X2+X3",
115     "S+       X2+X3",
116     "  C+     X2+X3",
117     "S+C+     X2+X3",
118     "    A+   X2+X3",
119     "S+  A+   X2+X3",
120     "  C+A+   X2+X3",
121     "S+C+A+   X2+X3",
122     "      X1+X2+X3",
123     "S+    X1+X2+X3",
124     "  C+  X1+X2+X3",
125     "S+C+  X1+X2+X3",
126     "    A+X1+X2+X3",
127     "S+  A+X1+X2+X3",
128     "  C+A+X1+X2+X3",
129     "S+C+A+X1+X2+X3",
130     "unexpected",
131     "unexpected"
132 };
133 
134 /* Table of Cap States */
135 PCHAR CapState[] =
136 {
137     "0",
138     "CAPLOK",
139     "SGCAPS",
140     "CAPLOCK | SGCAPS",
141     "CAPLOKALTGR",
142     "CAPLOK | CAPLOKALTGR"
143 };
144 
145 /* ISO 110-key Keyboard Scancode to Virtual Key Conversion Table */
146 SCVK ScVk[] =
147 {
148     {0x02, '1', NULL, FALSE},
149     {0x03, '2', NULL, FALSE},
150     {0x04, '3', NULL, FALSE},
151     {0x05, '4', NULL, FALSE},
152     {0x06, '5', NULL, FALSE},
153     {0x07, '6', NULL, FALSE},
154     {0x08, '7', NULL, FALSE},
155     {0x09, '8', NULL, FALSE},
156     {0x0a, '9', NULL, FALSE},
157     {0x0b, '0', NULL, FALSE},
158     {0x0c, 0xbd, NULL, FALSE},
159     {0x0d, 0xbb, NULL, FALSE},
160     {0x10, 'Q', NULL, FALSE},
161     {0x11, 'W', NULL, FALSE},
162     {0x12, 'E', NULL, FALSE},
163     {0x13, 'R', NULL, FALSE},
164     {0x14, 'T', NULL, FALSE},
165     {0x15, 'Y', NULL, FALSE},
166     {0x16, 'U', NULL, FALSE},
167     {0x17, 'I', NULL, FALSE},
168     {0x18, 'O', NULL, FALSE},
169     {0x19, 'P', NULL, FALSE},
170     {0x1a, 0xdb, NULL, FALSE},
171     {0x1b, 0xdd, NULL, FALSE},
172     {0x1e, 'A', NULL, FALSE},
173     {0x1f, 'S', NULL, FALSE},
174     {0x20, 'D', NULL, FALSE},
175     {0x21, 'F', NULL, FALSE},
176     {0x22, 'G', NULL, FALSE},
177     {0x23, 'H', NULL, FALSE},
178     {0x24, 'J', NULL, FALSE},
179     {0x25, 'K', NULL, FALSE},
180     {0x26, 'L', NULL, FALSE},
181     {0x27, 0xba, NULL, FALSE},
182     {0x28, 0xde, NULL, FALSE},
183     {0x29, 0xc0, NULL, FALSE},
184     {0x2b, 0xdc, NULL, FALSE},
185     {0x2c, 'Z', NULL, FALSE},
186     {0x2d, 'X', NULL, FALSE},
187     {0x2e, 'C', NULL, FALSE},
188     {0x2f, 'V', NULL, FALSE},
189     {0x30, 'B', NULL, FALSE},
190     {0x31, 'N', NULL, FALSE},
191     {0x32, 'M', NULL, FALSE},
192     {0x33, 0xbc, NULL, FALSE},
193     {0x34, 0xbe, NULL, FALSE},
194     {0x35, 0xbf, NULL, FALSE},
195     {0x53, 0x6e, NULL, FALSE},
196     {0x56, 0xe2, NULL, FALSE},
197     {0x73, 0xc1, NULL, FALSE},
198     {0x7e, 0xc2, NULL, FALSE},
199     {0xe010, 0xb1, "Speedracer: Previous Track", FALSE},
200     {0xe019, 0xb0, "Speedracer: Next Track", FALSE},
201     {0xe01d, 0xa3, "RControl", FALSE},
202     {0xe020, 0xad, "Speedracer: Volume Mute", FALSE},
203     {0xe021, 0xb7, "Speedracer: Launch App 2", FALSE},
204     {0xe022, 0xb3, "Speedracer: Media Play/Pause", FALSE},
205     {0xe024, 0xb2, "Speedracer: Media Stop", FALSE},
206     {0xe02e, 0xae, "Speedracer: Volume Up", FALSE},
207     {0xe030, 0xaf, "Speedracer: Volume Down", FALSE},
208     {0xe032, 0xac, "Speedracer: Browser Home", FALSE},
209     {0xe035, 0x6f, "Numpad Divide", FALSE},
210     {0xe037, 0x2c, "Snapshot", FALSE},
211     {0xe038, 0xa5, "RMenu", FALSE},
212     {0xe047, 0x24, "Home", FALSE},
213     {0xe048, 0x26, "Up", FALSE},
214     {0xe049, 0x21, "Prior", FALSE},
215     {0xe04b, 0x25, "Left", FALSE},
216     {0xe04d, 0x27, "Right", FALSE},
217     {0xe04f, 0x23, "End", FALSE},
218     {0xe050, 0x28, "Down", FALSE},
219     {0xe051, 0x22, "Next", FALSE},
220     {0xe052, 0x2d, "Insert", FALSE},
221     {0xe053, 0x2e, "Delete", FALSE},
222     {0xe05b, 0x5b, "Left Win", FALSE},
223     {0xe05c, 0x5c, "Right Win", FALSE},
224     {0xe05d, 0x5d, "Application", FALSE},
225     {0xe05e, 0xff, "Power", FALSE},
226     {0xe05f, 0x5f, "Speedracer: Sleep", FALSE},
227     {0xe060, 0xff, "BAD SCANCODE", FALSE},
228     {0xe061, 0xff, "BAD SCANCODE", FALSE},
229     {0xe065, 0xaa, "Speedracer: Browser Search", FALSE},
230     {0xe066, 0xab, "Speedracer: Browser Favorites", FALSE},
231     {0xe067, 0xa8, "Speedracer: Browser Refresh", FALSE},
232     {0xe068, 0xa9, "Speedracer: Browser Stop", FALSE},
233     {0xe069, 0xa7, "Speedracer: Browser Foward", FALSE},
234     {0xe06a, 0xa6, "Speedracer: Browser Back", FALSE},
235     {0xe06b, 0xb6, "Speedracer: Launch App 1", FALSE},
236     {0xe06c, 0xb4, "Speedracer: Launch Mail", FALSE},
237     {0xe06d, 0xb5, "Speedracer: Launch Media Selector", FALSE},
238     {0x53, 0x6e, NULL, FALSE},
239     {0x0e, 0x08, NULL, FALSE},
240     {0x01, 0x1b, NULL, FALSE},
241     {0xe01c, 0x0d, "Numpad Enter", FALSE},
242     {0x1c, 0x0d, NULL, FALSE},
243     {0x39, 0x20, NULL, FALSE},
244     {0xe046, 0x03, "Break (Ctrl + Pause)", FALSE},
245     {0xFFFF, 0x00, NULL, FALSE},
246     {0xFFFF, 0x00, NULL, FALSE},
247     {0xFFFF, 0x00, NULL, FALSE},
248     {0xFFFF, 0x00, NULL, FALSE},
249     {0xFFFF, 0x00, NULL, FALSE},
250     {0xFFFF, 0x00, NULL, FALSE},
251     {0xFFFF, 0x00, NULL, FALSE},
252     {0xFFFF, 0x00, NULL, FALSE},
253     {0xFFFF, 0x00, NULL, FALSE},
254     {0xFFFF, 0x00, NULL, FALSE},
255     {0xFFFF, 0x00, NULL, FALSE},
256     {0xFFFF, 0x00, NULL, FALSE},
257     {0xFFFF, 0x00, NULL, FALSE},
258     {0xFFFF, 0x00, NULL, FALSE}
259 };
260 
261 /* FUNCTIONS ******************************************************************/
262 
263 /* EOF */
264