comparison src/events/scancodes_windows.h @ 5062:e8916fe9cfc8

Fixed bug #925 Changed "win32" to "windows"
author Sam Lantinga <slouken@libsdl.org>
date Thu, 20 Jan 2011 18:04:05 -0800
parents src/events/scancodes_win32.h@ffd169948438
children 25d4feb7c127
comparison
equal deleted inserted replaced
5061:9e9940eae455 5062:e8916fe9cfc8
1 /*
2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2010 Sam Lantinga
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19 Sam Lantinga
20 slouken@libsdl.org
21 */
22 #include "../../include/SDL_scancode.h"
23
24 /* Win32 virtual key code to SDL scancode mapping table
25 Sources:
26 - msdn.microsoft.com
27 */
28 /* *INDENT-OFF* */
29 static const SDL_scancode windows_scancode_table[] = {
30 /* 0, 0x00 */ SDL_SCANCODE_UNKNOWN,
31 /* 1, 0x01 */ SDL_SCANCODE_UNKNOWN,
32 /* 2, 0x02 */ SDL_SCANCODE_UNKNOWN,
33 /* 3, 0x03 */ SDL_SCANCODE_UNKNOWN,
34 /* 4, 0x04 */ SDL_SCANCODE_UNKNOWN,
35 /* 5, 0x05 */ SDL_SCANCODE_UNKNOWN,
36 /* 6, 0x06 */ SDL_SCANCODE_UNKNOWN,
37 /* 7, 0x07 */ SDL_SCANCODE_UNKNOWN,
38 /* 8, 0x08 */ SDL_SCANCODE_BACKSPACE,
39 /* 9, 0x09 */ SDL_SCANCODE_TAB,
40 /* 10, 0x0a */ SDL_SCANCODE_KP_ENTER, /* Not a VKEY, SDL specific */
41 /* 11, 0x0b */ SDL_SCANCODE_UNKNOWN,
42 /* 12, 0x0c */ SDL_SCANCODE_CLEAR,
43 /* 13, 0x0d */ SDL_SCANCODE_RETURN,
44 /* 14, 0x0e */ SDL_SCANCODE_UNKNOWN,
45 /* 15, 0x0f */ SDL_SCANCODE_UNKNOWN,
46 /* 16, 0x10 */ SDL_SCANCODE_UNKNOWN,
47 /* 17, 0x11 */ SDL_SCANCODE_UNKNOWN,
48 /* 18, 0x12 */ SDL_SCANCODE_APPLICATION,
49 /* 19, 0x13 */ SDL_SCANCODE_PAUSE,
50 /* 20, 0x14 */ SDL_SCANCODE_CAPSLOCK,
51 /* 21, 0x15 */ SDL_SCANCODE_UNKNOWN,
52 /* 22, 0x16 */ SDL_SCANCODE_UNKNOWN,
53 /* 23, 0x17 */ SDL_SCANCODE_UNKNOWN,
54 /* 24, 0x18 */ SDL_SCANCODE_UNKNOWN,
55 /* 25, 0x19 */ SDL_SCANCODE_UNKNOWN,
56 /* 26, 0x1a */ SDL_SCANCODE_UNKNOWN,
57 /* 27, 0x1b */ SDL_SCANCODE_ESCAPE,
58 /* 28, 0x1c */ SDL_SCANCODE_UNKNOWN,
59 /* 29, 0x1d */ SDL_SCANCODE_UNKNOWN,
60 /* 30, 0x1e */ SDL_SCANCODE_UNKNOWN,
61 /* 31, 0x1f */ SDL_SCANCODE_MODE,
62 /* 32, 0x20 */ SDL_SCANCODE_SPACE,
63 /* 33, 0x21 */ SDL_SCANCODE_PAGEUP,
64 /* 34, 0x22 */ SDL_SCANCODE_PAGEDOWN,
65 /* 35, 0x23 */ SDL_SCANCODE_END,
66 /* 36, 0x24 */ SDL_SCANCODE_HOME,
67 /* 37, 0x25 */ SDL_SCANCODE_LEFT,
68 /* 38, 0x26 */ SDL_SCANCODE_UP,
69 /* 39, 0x27 */ SDL_SCANCODE_RIGHT,
70 /* 40, 0x28 */ SDL_SCANCODE_DOWN,
71 /* 41, 0x29 */ SDL_SCANCODE_SELECT,
72 /* 42, 0x2a */ SDL_SCANCODE_UNKNOWN, /* VK_PRINT */
73 /* 43, 0x2b */ SDL_SCANCODE_EXECUTE,
74 /* 44, 0x2c */ SDL_SCANCODE_PRINTSCREEN,
75 /* 45, 0x2d */ SDL_SCANCODE_INSERT,
76 /* 46, 0x2e */ SDL_SCANCODE_DELETE,
77 /* 47, 0x2f */ SDL_SCANCODE_HELP,
78 /* 48, 0x30 */ SDL_SCANCODE_0,
79 /* 49, 0x31 */ SDL_SCANCODE_1,
80 /* 50, 0x32 */ SDL_SCANCODE_2,
81 /* 51, 0x33 */ SDL_SCANCODE_3,
82 /* 52, 0x34 */ SDL_SCANCODE_4,
83 /* 53, 0x35 */ SDL_SCANCODE_5,
84 /* 54, 0x36 */ SDL_SCANCODE_6,
85 /* 55, 0x37 */ SDL_SCANCODE_7,
86 /* 56, 0x38 */ SDL_SCANCODE_8,
87 /* 57, 0x39 */ SDL_SCANCODE_9,
88 /* 58, 0x3a */ SDL_SCANCODE_UNKNOWN,
89 /* 59, 0x3b */ SDL_SCANCODE_UNKNOWN,
90 /* 60, 0x3c */ SDL_SCANCODE_UNKNOWN,
91 /* 61, 0x3d */ SDL_SCANCODE_UNKNOWN,
92 /* 62, 0x3e */ SDL_SCANCODE_UNKNOWN,
93 /* 63, 0x3f */ SDL_SCANCODE_UNKNOWN,
94 /* 64, 0x40 */ SDL_SCANCODE_UNKNOWN,
95 /* 65, 0x41 */ SDL_SCANCODE_A,
96 /* 66, 0x42 */ SDL_SCANCODE_B,
97 /* 67, 0x43 */ SDL_SCANCODE_C,
98 /* 68, 0x44 */ SDL_SCANCODE_D,
99 /* 69, 0x45 */ SDL_SCANCODE_E,
100 /* 70, 0x46 */ SDL_SCANCODE_F,
101 /* 71, 0x47 */ SDL_SCANCODE_G,
102 /* 72, 0x48 */ SDL_SCANCODE_H,
103 /* 73, 0x49 */ SDL_SCANCODE_I,
104 /* 74, 0x4a */ SDL_SCANCODE_J,
105 /* 75, 0x4b */ SDL_SCANCODE_K,
106 /* 76, 0x4c */ SDL_SCANCODE_L,
107 /* 77, 0x4d */ SDL_SCANCODE_M,
108 /* 78, 0x4e */ SDL_SCANCODE_N,
109 /* 79, 0x4f */ SDL_SCANCODE_O,
110 /* 80, 0x50 */ SDL_SCANCODE_P,
111 /* 81, 0x51 */ SDL_SCANCODE_Q,
112 /* 82, 0x52 */ SDL_SCANCODE_R,
113 /* 83, 0x53 */ SDL_SCANCODE_S,
114 /* 84, 0x54 */ SDL_SCANCODE_T,
115 /* 85, 0x55 */ SDL_SCANCODE_U,
116 /* 86, 0x56 */ SDL_SCANCODE_V,
117 /* 87, 0x57 */ SDL_SCANCODE_W,
118 /* 88, 0x58 */ SDL_SCANCODE_X,
119 /* 89, 0x59 */ SDL_SCANCODE_Y,
120 /* 90, 0x5a */ SDL_SCANCODE_Z,
121 /* 91, 0x5b */ SDL_SCANCODE_LGUI,
122 /* 92, 0x5c */ SDL_SCANCODE_RGUI,
123 /* 93, 0x5d */ SDL_SCANCODE_APPLICATION,
124 /* 94, 0x5e */ SDL_SCANCODE_UNKNOWN,
125 /* 95, 0x5f */ SDL_SCANCODE_UNKNOWN,
126 /* 96, 0x60 */ SDL_SCANCODE_KP_0,
127 /* 97, 0x61 */ SDL_SCANCODE_KP_1,
128 /* 98, 0x62 */ SDL_SCANCODE_KP_2,
129 /* 99, 0x63 */ SDL_SCANCODE_KP_3,
130 /* 100, 0x64 */ SDL_SCANCODE_KP_4,
131 /* 101, 0x65 */ SDL_SCANCODE_KP_5,
132 /* 102, 0x66 */ SDL_SCANCODE_KP_6,
133 /* 103, 0x67 */ SDL_SCANCODE_KP_7,
134 /* 104, 0x68 */ SDL_SCANCODE_KP_8,
135 /* 105, 0x69 */ SDL_SCANCODE_KP_9,
136 /* 106, 0x6a */ SDL_SCANCODE_KP_MULTIPLY,
137 /* 107, 0x6b */ SDL_SCANCODE_KP_PLUS,
138 /* 108, 0x6c */ SDL_SCANCODE_SEPARATOR,
139 /* 109, 0x6d */ SDL_SCANCODE_KP_MINUS,
140 /* 110, 0x6e */ SDL_SCANCODE_KP_DECIMAL,
141 /* 111, 0x6f */ SDL_SCANCODE_KP_DIVIDE,
142 /* 112, 0x70 */ SDL_SCANCODE_F1,
143 /* 113, 0x71 */ SDL_SCANCODE_F2,
144 /* 114, 0x72 */ SDL_SCANCODE_F3,
145 /* 115, 0x73 */ SDL_SCANCODE_F4,
146 /* 116, 0x74 */ SDL_SCANCODE_F5,
147 /* 117, 0x75 */ SDL_SCANCODE_F6,
148 /* 118, 0x76 */ SDL_SCANCODE_F7,
149 /* 119, 0x77 */ SDL_SCANCODE_F8,
150 /* 120, 0x78 */ SDL_SCANCODE_F9,
151 /* 121, 0x79 */ SDL_SCANCODE_F10,
152 /* 122, 0x7a */ SDL_SCANCODE_F11,
153 /* 123, 0x7b */ SDL_SCANCODE_F12,
154 /* 124, 0x7c */ SDL_SCANCODE_F13,
155 /* 125, 0x7d */ SDL_SCANCODE_F14,
156 /* 126, 0x7e */ SDL_SCANCODE_F15,
157 /* 127, 0x7f */ SDL_SCANCODE_F16,
158 /* 128, 0x80 */ SDL_SCANCODE_F17, /* or SDL_SCANCODE_AUDIONEXT */
159 /* 129, 0x81 */ SDL_SCANCODE_F18, /* or SDL_SCANCODE_AUDIOPREV */
160 /* 130, 0x82 */ SDL_SCANCODE_F19, /* or SDL_SCANCODE_AUDIOSTOP */
161 /* 131, 0x83 */ SDL_SCANCODE_F20, /* or SDL_SCANCODE_AUDIOPLAY */
162 /* 132, 0x84 */ SDL_SCANCODE_F21, /* or SDL_SCANCODE_MAIL */
163 /* 133, 0x85 */ SDL_SCANCODE_F22, /* or SDL_SCANCODE_MEDIASELECT */
164 /* 134, 0x86 */ SDL_SCANCODE_F23, /* or SDL_SCANCODE_WWW */
165 /* 135, 0x87 */ SDL_SCANCODE_F24, /* or SDL_SCANCODE_CALCULATOR */
166 /* 136, 0x88 */ SDL_SCANCODE_UNKNOWN,
167 /* 137, 0x89 */ SDL_SCANCODE_UNKNOWN,
168 /* 138, 0x8a */ SDL_SCANCODE_UNKNOWN,
169 /* 139, 0x8b */ SDL_SCANCODE_UNKNOWN,
170 /* 140, 0x8c */ SDL_SCANCODE_UNKNOWN,
171 /* 141, 0x8d */ SDL_SCANCODE_UNKNOWN,
172 /* 142, 0x8e */ SDL_SCANCODE_UNKNOWN,
173 /* 143, 0x8f */ SDL_SCANCODE_UNKNOWN,
174 /* 144, 0x90 */ SDL_SCANCODE_NUMLOCKCLEAR,
175 /* 145, 0x91 */ SDL_SCANCODE_SCROLLLOCK,
176 /* 146, 0x92 */ SDL_SCANCODE_KP_EQUALS,
177 /* 147, 0x93 */ SDL_SCANCODE_UNKNOWN,
178 /* 148, 0x94 */ SDL_SCANCODE_UNKNOWN,
179 /* 149, 0x95 */ SDL_SCANCODE_UNKNOWN,
180 /* 150, 0x96 */ SDL_SCANCODE_UNKNOWN,
181 /* 151, 0x97 */ SDL_SCANCODE_UNKNOWN,
182 /* 152, 0x98 */ SDL_SCANCODE_UNKNOWN,
183 /* 153, 0x99 */ SDL_SCANCODE_UNKNOWN,
184 /* 154, 0x9a */ SDL_SCANCODE_UNKNOWN,
185 /* 155, 0x9b */ SDL_SCANCODE_UNKNOWN,
186 /* 156, 0x9c */ SDL_SCANCODE_UNKNOWN,
187 /* 157, 0x9d */ SDL_SCANCODE_UNKNOWN,
188 /* 158, 0x9e */ SDL_SCANCODE_UNKNOWN,
189 /* 159, 0x9f */ SDL_SCANCODE_UNKNOWN,
190 /* 160, 0xa0 */ SDL_SCANCODE_LSHIFT,
191 /* 161, 0xa1 */ SDL_SCANCODE_RSHIFT,
192 /* 162, 0xa2 */ SDL_SCANCODE_LCTRL,
193 /* 163, 0xa3 */ SDL_SCANCODE_RCTRL,
194 /* 164, 0xa4 */ SDL_SCANCODE_LALT,
195 /* 165, 0xa5 */ SDL_SCANCODE_RALT,
196 /* 166, 0xa6 */ SDL_SCANCODE_AC_BACK,
197 /* 167, 0xa7 */ SDL_SCANCODE_AC_FORWARD,
198 /* 168, 0xa8 */ SDL_SCANCODE_AC_REFRESH,
199 /* 169, 0xa9 */ SDL_SCANCODE_AC_STOP,
200 /* 170, 0xaa */ SDL_SCANCODE_AC_SEARCH,
201 /* 171, 0xab */ SDL_SCANCODE_AC_BOOKMARKS,
202 /* 172, 0xac */ SDL_SCANCODE_AC_HOME,
203 /* 173, 0xad */ SDL_SCANCODE_AUDIOMUTE,
204 /* 174, 0xae */ SDL_SCANCODE_VOLUMEDOWN,
205 /* 175, 0xaf */ SDL_SCANCODE_VOLUMEUP,
206 /* 176, 0xb0 */ SDL_SCANCODE_AUDIONEXT,
207 /* 177, 0xb1 */ SDL_SCANCODE_AUDIOPREV,
208 /* 178, 0xb2 */ SDL_SCANCODE_AUDIOSTOP,
209 /* 179, 0xb3 */ SDL_SCANCODE_AUDIOPLAY,
210 /* 180, 0xb4 */ SDL_SCANCODE_MAIL,
211 /* 181, 0xb5 */ SDL_SCANCODE_MEDIASELECT,
212 /* 182, 0xb6 */ SDL_SCANCODE_UNKNOWN, /* VK_LAUNCH_APP1 */
213 /* 183, 0xb7 */ SDL_SCANCODE_UNKNOWN, /* VK_LAUNCH_APP2 */
214 /* 184, 0xb8 */ SDL_SCANCODE_UNKNOWN,
215 /* 185, 0xb9 */ SDL_SCANCODE_UNKNOWN,
216 /* 186, 0xba */ SDL_SCANCODE_SEMICOLON,
217 /* 187, 0xbb */ SDL_SCANCODE_EQUALS,
218 /* 188, 0xbc */ SDL_SCANCODE_COMMA,
219 /* 189, 0xbd */ SDL_SCANCODE_MINUS,
220 /* 190, 0xbe */ SDL_SCANCODE_PERIOD,
221 /* 191, 0xbf */ SDL_SCANCODE_SLASH,
222 /* 192, 0xc0 */ SDL_SCANCODE_GRAVE,
223 /* 193, 0xc1 */ SDL_SCANCODE_UNKNOWN,
224 /* 194, 0xc2 */ SDL_SCANCODE_UNKNOWN,
225 /* 195, 0xc3 */ SDL_SCANCODE_UNKNOWN,
226 /* 196, 0xc4 */ SDL_SCANCODE_UNKNOWN,
227 /* 197, 0xc5 */ SDL_SCANCODE_UNKNOWN,
228 /* 198, 0xc6 */ SDL_SCANCODE_UNKNOWN,
229 /* 199, 0xc7 */ SDL_SCANCODE_UNKNOWN,
230 /* 200, 0xc8 */ SDL_SCANCODE_UNKNOWN,
231 /* 201, 0xc9 */ SDL_SCANCODE_UNKNOWN,
232 /* 202, 0xca */ SDL_SCANCODE_UNKNOWN,
233 /* 203, 0xcb */ SDL_SCANCODE_UNKNOWN,
234 /* 204, 0xcc */ SDL_SCANCODE_UNKNOWN,
235 /* 205, 0xcd */ SDL_SCANCODE_UNKNOWN,
236 /* 206, 0xce */ SDL_SCANCODE_UNKNOWN,
237 /* 207, 0xcf */ SDL_SCANCODE_UNKNOWN,
238 /* 208, 0xd0 */ SDL_SCANCODE_UNKNOWN,
239 /* 209, 0xd1 */ SDL_SCANCODE_UNKNOWN,
240 /* 210, 0xd2 */ SDL_SCANCODE_UNKNOWN,
241 /* 211, 0xd3 */ SDL_SCANCODE_UNKNOWN,
242 /* 212, 0xd4 */ SDL_SCANCODE_UNKNOWN,
243 /* 213, 0xd5 */ SDL_SCANCODE_UNKNOWN,
244 /* 214, 0xd6 */ SDL_SCANCODE_UNKNOWN,
245 /* 215, 0xd7 */ SDL_SCANCODE_UNKNOWN,
246 /* 216, 0xd8 */ SDL_SCANCODE_UNKNOWN,
247 /* 217, 0xd9 */ SDL_SCANCODE_UNKNOWN,
248 /* 218, 0xda */ SDL_SCANCODE_UNKNOWN,
249 /* 219, 0xdb */ SDL_SCANCODE_LEFTBRACKET,
250 /* 220, 0xdc */ SDL_SCANCODE_BACKSLASH,
251 /* 221, 0xdd */ SDL_SCANCODE_RIGHTBRACKET,
252 /* 222, 0xde */ SDL_SCANCODE_APOSTROPHE,
253 /* 223, 0xdf */ SDL_SCANCODE_UNKNOWN,
254 /* 224, 0xe0 */ SDL_SCANCODE_UNKNOWN,
255 /* 225, 0xe1 */ SDL_SCANCODE_UNKNOWN,
256 /* 226, 0xe2 */ SDL_SCANCODE_NONUSBACKSLASH,
257 /* 227, 0xe3 */ SDL_SCANCODE_UNKNOWN,
258 /* 228, 0xe4 */ SDL_SCANCODE_UNKNOWN,
259 /* 229, 0xe5 */ SDL_SCANCODE_UNKNOWN,
260 /* 230, 0xe6 */ SDL_SCANCODE_UNKNOWN,
261 /* 231, 0xe7 */ SDL_SCANCODE_UNKNOWN,
262 /* 232, 0xe8 */ SDL_SCANCODE_UNKNOWN,
263 /* 233, 0xe9 */ SDL_SCANCODE_UNKNOWN,
264 /* 234, 0xea */ SDL_SCANCODE_UNKNOWN,
265 /* 235, 0xeb */ SDL_SCANCODE_UNKNOWN,
266 /* 236, 0xec */ SDL_SCANCODE_UNKNOWN,
267 /* 237, 0xed */ SDL_SCANCODE_UNKNOWN,
268 /* 238, 0xee */ SDL_SCANCODE_UNKNOWN,
269 /* 239, 0xef */ SDL_SCANCODE_UNKNOWN,
270 /* 240, 0xf0 */ SDL_SCANCODE_UNKNOWN,
271 /* 241, 0xf1 */ SDL_SCANCODE_UNKNOWN,
272 /* 242, 0xf2 */ SDL_SCANCODE_UNKNOWN,
273 /* 243, 0xf3 */ SDL_SCANCODE_UNKNOWN,
274 /* 244, 0xf4 */ SDL_SCANCODE_UNKNOWN,
275 /* 245, 0xf5 */ SDL_SCANCODE_UNKNOWN,
276 /* 246, 0xf6 */ SDL_SCANCODE_SYSREQ,
277 /* 247, 0xf7 */ SDL_SCANCODE_CRSEL,
278 /* 248, 0xf8 */ SDL_SCANCODE_EXSEL,
279 /* 249, 0xf9 */ SDL_SCANCODE_UNKNOWN, /* VK_EREOF */
280 /* 250, 0xfa */ SDL_SCANCODE_UNKNOWN, /* VK_PLAY */
281 /* 251, 0xfb */ SDL_SCANCODE_UNKNOWN, /* VK_ZOOM */
282 /* 252, 0xfc */ SDL_SCANCODE_UNKNOWN,
283 /* 253, 0xfd */ SDL_SCANCODE_UNKNOWN, /* VK_PA1 */
284 /* 254, 0xfe */ SDL_SCANCODE_CLEAR,
285 /* 255, 0xff */ SDL_SCANCODE_UNKNOWN,
286 };
287 /* *INDENT-ON* */