2269
|
1 /*
|
|
2 SDL - Simple DirectMedia Layer
|
|
3 Copyright (C) 1997-2007 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 Christian Walther
|
|
20 cwalther@gmx.ch
|
|
21 */
|
|
22
|
|
23 /* Names for the physical SDLKey constants, returned by SDL_GetKeyName().
|
|
24 The strings are in UTF-8 encoding.
|
|
25 This table can (and should) be modified by a video driver in its VideoInit()
|
|
26 function using SDL_SetKeyName() to account for platform-dependent (but
|
|
27 layout-independent) key names.
|
|
28
|
|
29 The physical SDLKey codes can be divided into two groups:
|
|
30 - codes that occur both as physical and as layout keys. These have their
|
|
31 real, "user-readable" display name here.
|
|
32 - codes that only occur as physical keys, i.e. are never returned by
|
|
33 SDL_GetLayoutKey() if the backend implements it properly. These names are
|
|
34 therefore never returned by SDL_GetKeyName(SDL_GetLayoutKey(
|
|
35 event.key.keysym.sym)), the proper way of displaying a key name to the
|
|
36 user, but only by SDL_GetKeyName(event.key.keysym.sym), which is only
|
|
37 useful for debugging purposes. To emphasize this, these codes are named by
|
|
38 their "programmer-readable" SDLK_ constants here rather than by a
|
|
39 "user-readable" display name.
|
|
40 */
|
|
41
|
|
42 /* *INDENT-OFF* */
|
|
43 static const char *SDL_keynames[SDLK_LAST] = {
|
|
44 /* 0 */ "", /* SDL_PK_NONE */
|
|
45 /* 1 */ "unknown key",
|
|
46 /* 2 */ NULL, /* unused */
|
|
47 /* 3 */ NULL, /* unused */
|
|
48 /* 4 */ "SDLK_A",
|
|
49 /* 5 */ "SDLK_B",
|
|
50 /* 6 */ "SDLK_C",
|
|
51 /* 7 */ "SDLK_D",
|
|
52 /* 8 */ "SDLK_E",
|
|
53 /* 9 */ "SDLK_F",
|
|
54 /* 10 */ "SDLK_G",
|
|
55 /* 11 */ "SDLK_H",
|
|
56 /* 12 */ "SDLK_I",
|
|
57 /* 13 */ "SDLK_J",
|
|
58 /* 14 */ "SDLK_K",
|
|
59 /* 15 */ "SDLK_L",
|
|
60 /* 16 */ "SDLK_M",
|
|
61 /* 17 */ "SDLK_N",
|
|
62 /* 18 */ "SDLK_O",
|
|
63 /* 19 */ "SDLK_P",
|
|
64 /* 20 */ "SDLK_Q",
|
|
65 /* 21 */ "SDLK_R",
|
|
66 /* 22 */ "SDLK_S",
|
|
67 /* 23 */ "SDLK_T",
|
|
68 /* 24 */ "SDLK_U",
|
|
69 /* 25 */ "SDLK_V",
|
|
70 /* 26 */ "SDLK_W",
|
|
71 /* 27 */ "SDLK_X",
|
|
72 /* 28 */ "SDLK_Y",
|
|
73 /* 29 */ "SDLK_Z",
|
|
74 /* 30 */ "SDLK_1",
|
|
75 /* 31 */ "SDLK_2",
|
|
76 /* 32 */ "SDLK_3",
|
|
77 /* 33 */ "SDLK_4",
|
|
78 /* 34 */ "SDLK_5",
|
|
79 /* 35 */ "SDLK_6",
|
|
80 /* 36 */ "SDLK_7",
|
|
81 /* 37 */ "SDLK_8",
|
|
82 /* 38 */ "SDLK_9",
|
|
83 /* 39 */ "SDLK_0",
|
|
84 /* 40 */ "return",
|
|
85 /* 41 */ "escape",
|
|
86 /* 42 */ "backspace",
|
|
87 /* 43 */ "tab",
|
|
88 /* 44 */ "space",
|
|
89 /* 45 */ "SDLK_HYPHENMINUS",
|
|
90 /* 46 */ "SDLK_EQUALS",
|
|
91 /* 47 */ "SDLK_LEFTBRACKET",
|
|
92 /* 48 */ "SDLK_RIGHTBRACKET",
|
|
93 /* 49 */ "SDLK_BACKSLASH",
|
|
94 /* 50 */ "SDLK_NONUSHASH",
|
|
95 /* 51 */ "SDLK_SEMICOLON",
|
|
96 /* 52 */ "SDLK_APOSTROPHE",
|
|
97 /* 53 */ "SDLK_GRAVE",
|
|
98 /* 54 */ "SDLK_COMMA",
|
|
99 /* 55 */ "SDLK_PERIOD",
|
|
100 /* 56 */ "SDLK_SLASH",
|
|
101 /* 57 */ "caps lock",
|
|
102 /* 58 */ "F1",
|
|
103 /* 59 */ "F2",
|
|
104 /* 60 */ "F3",
|
|
105 /* 61 */ "F4",
|
|
106 /* 62 */ "F5",
|
|
107 /* 63 */ "F6",
|
|
108 /* 64 */ "F7",
|
|
109 /* 65 */ "F8",
|
|
110 /* 66 */ "F9",
|
|
111 /* 67 */ "F10",
|
|
112 /* 68 */ "F11",
|
|
113 /* 69 */ "F12",
|
|
114 /* 70 */ "print screen",
|
|
115 /* 71 */ "scroll lock",
|
|
116 /* 72 */ "pause",
|
|
117 /* 73 */ "insert",
|
|
118 /* 74 */ "home",
|
|
119 /* 75 */ "page up",
|
|
120 /* 76 */ "delete",
|
|
121 /* 77 */ "end",
|
|
122 /* 78 */ "page down",
|
|
123 /* 79 */ "right",
|
|
124 /* 80 */ "left",
|
|
125 /* 81 */ "down",
|
|
126 /* 82 */ "up",
|
|
127 /* 83 */ "num lock",
|
|
128 /* 84 */ "SDLK_KP_DIVIDE",
|
|
129 /* 85 */ "SDLK_KP_MULTIPLY",
|
|
130 /* 86 */ "SDLK_KP_MINUS",
|
|
131 /* 87 */ "SDLK_KP_PLUS",
|
|
132 /* 88 */ "enter",
|
|
133 /* 89 */ "SDLK_KP_1",
|
|
134 /* 90 */ "SDLK_KP_2",
|
|
135 /* 91 */ "SDLK_KP_3",
|
|
136 /* 92 */ "SDLK_KP_4",
|
|
137 /* 93 */ "SDLK_KP_5",
|
|
138 /* 94 */ "SDLK_KP_6",
|
|
139 /* 95 */ "SDLK_KP_7",
|
|
140 /* 96 */ "SDLK_KP_8",
|
|
141 /* 97 */ "SDLK_KP_9",
|
|
142 /* 98 */ "SDLK_KP_0",
|
|
143 /* 99 */ "SDLK_KP_PERIOD",
|
|
144 /* 100 */ "SDLK_NONUSBACKSLASH",
|
|
145 /* 101 */ "application",
|
|
146 /* 102 */ "power",
|
|
147 /* 103 */ "SDLK_KP_EQUALS",
|
|
148 /* 104 */ "F13",
|
|
149 /* 105 */ "F14",
|
|
150 /* 106 */ "F15",
|
|
151 /* 107 */ "F16",
|
|
152 /* 108 */ "F17",
|
|
153 /* 109 */ "F18",
|
|
154 /* 110 */ "F19",
|
|
155 /* 111 */ "F20",
|
|
156 /* 112 */ "F21",
|
|
157 /* 113 */ "F22",
|
|
158 /* 114 */ "F23",
|
|
159 /* 115 */ "F24",
|
|
160 /* 116 */ "execute",
|
|
161 /* 117 */ "help",
|
|
162 /* 118 */ "menu",
|
|
163 /* 119 */ "select",
|
|
164 /* 120 */ "stop",
|
|
165 /* 121 */ "again",
|
|
166 /* 122 */ "undo",
|
|
167 /* 123 */ "cut",
|
|
168 /* 124 */ "copy",
|
|
169 /* 125 */ "paste",
|
|
170 /* 126 */ "find",
|
|
171 /* 127 */ "mute",
|
|
172 /* 128 */ "volume up",
|
|
173 /* 129 */ "volume down",
|
|
174 /* 130 */ "caps lock", /* unused */
|
|
175 /* 131 */ "num lock", /* unused */
|
|
176 /* 132 */ "scroll lock", /* unused */
|
|
177 /* 133 */ "SDLK_KP_COMMA",
|
|
178 /* 134 */ "SDLK_KP_EQUALSAS400",
|
|
179 /* 135 */ "international 1",
|
|
180 /* 136 */ "international 2",
|
|
181 /* 137 */ "international 3",
|
|
182 /* 138 */ "international 4",
|
|
183 /* 139 */ "international 5",
|
|
184 /* 140 */ "international 6",
|
|
185 /* 141 */ "international 7",
|
|
186 /* 142 */ "international 8",
|
|
187 /* 143 */ "international 9",
|
|
188 /* 144 */ "lang 1",
|
|
189 /* 145 */ "lang 2",
|
|
190 /* 146 */ "lang 3",
|
|
191 /* 147 */ "lang 4",
|
|
192 /* 148 */ "lang 5",
|
|
193 /* 149 */ "lang 6",
|
|
194 /* 150 */ "lang 7",
|
|
195 /* 151 */ "lang 8",
|
|
196 /* 152 */ "lang 9",
|
|
197 /* 153 */ "alt erase",
|
|
198 /* 154 */ "sys req",
|
|
199 /* 155 */ "cancel",
|
|
200 /* 156 */ "clear",
|
|
201 /* 157 */ "prior",
|
|
202 /* 158 */ "return",
|
|
203 /* 159 */ "separator",
|
|
204 /* 160 */ "out",
|
|
205 /* 161 */ "oper",
|
|
206 /* 162 */ "clear/again",
|
|
207 /* 163 */ "crsel/props",
|
|
208 /* 164 */ "exsel",
|
|
209 /* 165 */ NULL, /* unused */
|
|
210 /* 166 */ NULL, /* unused */
|
|
211 /* 167 */ NULL, /* unused */
|
|
212 /* 168 */ NULL, /* unused */
|
|
213 /* 169 */ NULL, /* unused */
|
|
214 /* 170 */ NULL, /* unused */
|
|
215 /* 171 */ NULL, /* unused */
|
|
216 /* 172 */ NULL, /* unused */
|
|
217 /* 173 */ NULL, /* unused */
|
|
218 /* 174 */ NULL, /* unused */
|
|
219 /* 175 */ NULL, /* unused */
|
|
220 /* 176 */ "[00]",
|
|
221 /* 177 */ "[000]",
|
|
222 /* 178 */ "thousands separator",
|
|
223 /* 179 */ "decimal separator",
|
|
224 /* 180 */ "currency unit",
|
|
225 /* 181 */ "currency sub-unit",
|
|
226 /* 182 */ "[(]",
|
|
227 /* 183 */ "[)]",
|
|
228 /* 184 */ "[{]",
|
|
229 /* 185 */ "[}]",
|
|
230 /* 186 */ "[tab]",
|
|
231 /* 187 */ "[backspace]",
|
|
232 /* 188 */ "[A]",
|
|
233 /* 189 */ "[B]",
|
|
234 /* 190 */ "[C]",
|
|
235 /* 191 */ "[D]",
|
|
236 /* 192 */ "[E]",
|
|
237 /* 193 */ "[F]",
|
|
238 /* 194 */ "[XOR]",
|
|
239 /* 195 */ "[^]",
|
|
240 /* 196 */ "[%]",
|
|
241 /* 197 */ "[<]",
|
|
242 /* 198 */ "[>]",
|
|
243 /* 199 */ "[&]",
|
|
244 /* 200 */ "[&&]",
|
|
245 /* 201 */ "[|]",
|
|
246 /* 202 */ "[||]",
|
|
247 /* 203 */ "[:]",
|
|
248 /* 204 */ "[#]",
|
|
249 /* 205 */ "[space]",
|
|
250 /* 206 */ "[@]",
|
|
251 /* 207 */ "[!]",
|
|
252 /* 208 */ "[mem store]",
|
|
253 /* 209 */ "[mem recall]",
|
|
254 /* 210 */ "[mem clear]",
|
|
255 /* 211 */ "[mem +]",
|
|
256 /* 212 */ "[mem -]",
|
|
257 /* 213 */ "[mem *]",
|
|
258 /* 214 */ "[mem /]",
|
|
259 /* 215 */ "[+/-]",
|
|
260 /* 216 */ "[clear]",
|
|
261 /* 217 */ "[clear entry]",
|
|
262 /* 218 */ "[binary]",
|
|
263 /* 219 */ "[octal]",
|
|
264 /* 220 */ "[decimal]",
|
|
265 /* 221 */ "[hexadecimal]",
|
|
266 /* 222 */ NULL, /* unused */
|
|
267 /* 223 */ NULL, /* unused */
|
|
268 /* 224 */ "left ctrl",
|
|
269 /* 225 */ "left shift",
|
|
270 /* 226 */ "left alt",
|
|
271 /* 227 */ "left meta",
|
|
272 /* 228 */ "right ctrl",
|
|
273 /* 229 */ "right shift",
|
|
274 /* 230 */ "right alt",
|
|
275 /* 231 */ "right meta",
|
|
276 /* 232 */ "mode",
|
|
277 /* 233 */ NULL, /* unused */
|
|
278 /* 234 */ NULL, /* unused */
|
|
279 /* 235 */ NULL, /* unused */
|
|
280 /* 236 */ "brightness down",
|
|
281 /* 237 */ "brightness up",
|
|
282 /* 238 */ "display switch",
|
|
283 /* 239 */ "kbd illum toggle",
|
|
284 /* 240 */ "kbd illum down",
|
|
285 /* 241 */ "kbd illum up",
|
|
286 /* 242 */ "eject",
|
|
287 /* 243 */ "sleep",
|
|
288 /* 244 */ "play",
|
|
289 /* 245 */ "stop",
|
|
290 /* 246 */ "previous",
|
|
291 /* 247 */ "next",
|
|
292 /* 248 */ "calc",
|
|
293 /* 249 */ "www",
|
|
294 /* 250 */ "e-mail",
|
|
295 /* 251 */ "media",
|
|
296 /* 252 */ "computer",
|
|
297 /* 253 */ "search",
|
|
298 /* 254 */ "bookmarks",
|
|
299 /* 255 */ "back",
|
|
300 /* 256 */ "forward",
|
|
301 /* 257 */ "reload",
|
|
302 /* 258 */ "stop"
|
|
303 };
|
|
304 /* *INDENT-ON* */
|