blob: a2acb45a708ded8063f388c5d68f5ec36be8a16a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
|
#include <SDL.h>
#include <lauxlib.h>
#include "sdl.h"
static unsigned long refcnt;
int sdl_error(lua_State *L, const char *what)
{
return luaL_error(L, "%s failed: %s", what, SDL_GetError());
}
void acquire_sdl()
{
if (refcnt++ != 0) return;
SDL_Init(SDL_INIT_VIDEO);
SDL_EnableScreenSaver();
}
void release_sdl()
{
if (refcnt == 0 || --refcnt != 0) return;
SDL_Quit();
}
const char *strbutton(Uint8 button)
{
switch (button) {
case SDL_BUTTON_LEFT: return "LEFT";
case SDL_BUTTON_MIDDLE: return "MIDDLE";
case SDL_BUTTON_RIGHT: return "RIGHT";
case SDL_BUTTON_X1: return "X1";
case SDL_BUTTON_X2: return "X2";
default: return "UNK";
}
}
const char *strscancode(SDL_Scancode s)
{
switch (s) {
case SDL_SCANCODE_A: return "A";
case SDL_SCANCODE_B: return "B";
case SDL_SCANCODE_C: return "C";
case SDL_SCANCODE_D: return "D";
case SDL_SCANCODE_E: return "E";
case SDL_SCANCODE_F: return "F";
case SDL_SCANCODE_G: return "G";
case SDL_SCANCODE_H: return "H";
case SDL_SCANCODE_I: return "I";
case SDL_SCANCODE_J: return "J";
case SDL_SCANCODE_K: return "K";
case SDL_SCANCODE_L: return "L";
case SDL_SCANCODE_M: return "M";
case SDL_SCANCODE_N: return "N";
case SDL_SCANCODE_O: return "O";
case SDL_SCANCODE_P: return "P";
case SDL_SCANCODE_Q: return "Q";
case SDL_SCANCODE_R: return "R";
case SDL_SCANCODE_S: return "S";
case SDL_SCANCODE_T: return "T";
case SDL_SCANCODE_U: return "U";
case SDL_SCANCODE_V: return "V";
case SDL_SCANCODE_W: return "W";
case SDL_SCANCODE_X: return "X";
case SDL_SCANCODE_Y: return "Y";
case SDL_SCANCODE_Z: return "Z";
case SDL_SCANCODE_1: return "1";
case SDL_SCANCODE_2: return "2";
case SDL_SCANCODE_3: return "3";
case SDL_SCANCODE_4: return "4";
case SDL_SCANCODE_5: return "5";
case SDL_SCANCODE_6: return "6";
case SDL_SCANCODE_7: return "7";
case SDL_SCANCODE_8: return "8";
case SDL_SCANCODE_9: return "9";
case SDL_SCANCODE_0: return "0";
case SDL_SCANCODE_RETURN: return "RETURN";
case SDL_SCANCODE_ESCAPE: return "ESCAPE";
case SDL_SCANCODE_BACKSPACE: return "BACKSPACE";
case SDL_SCANCODE_TAB: return "TAB";
case SDL_SCANCODE_SPACE: return "SPACE";
case SDL_SCANCODE_MINUS: return "MINUS";
case SDL_SCANCODE_EQUALS: return "EQUALS";
case SDL_SCANCODE_LEFTBRACKET: return "LEFTBRACKET";
case SDL_SCANCODE_RIGHTBRACKET: return "RIGHTBRACKET";
case SDL_SCANCODE_BACKSLASH: return "BACKSLASH";
case SDL_SCANCODE_NONUSHASH: return "NONUSHASH";
case SDL_SCANCODE_SEMICOLON: return "SEMICOLON";
case SDL_SCANCODE_APOSTROPHE: return "APOSTROPHE";
case SDL_SCANCODE_GRAVE: return "GRAVE";
case SDL_SCANCODE_COMMA: return "COMMA";
case SDL_SCANCODE_PERIOD: return "PERIOD";
case SDL_SCANCODE_SLASH: return "SLASH";
case SDL_SCANCODE_CAPSLOCK: return "CAPSLOCK";
case SDL_SCANCODE_F1: return "F1";
case SDL_SCANCODE_F2: return "F2";
case SDL_SCANCODE_F3: return "F3";
case SDL_SCANCODE_F4: return "F4";
case SDL_SCANCODE_F5: return "F5";
case SDL_SCANCODE_F6: return "F6";
case SDL_SCANCODE_F7: return "F7";
case SDL_SCANCODE_F8: return "F8";
case SDL_SCANCODE_F9: return "F9";
case SDL_SCANCODE_F10: return "F10";
case SDL_SCANCODE_F11: return "F11";
case SDL_SCANCODE_F12: return "F12";
case SDL_SCANCODE_PRINTSCREEN: return "PRINTSCREEN";
case SDL_SCANCODE_SCROLLLOCK: return "SCROLLLOCK";
case SDL_SCANCODE_PAUSE: return "PAUSE";
case SDL_SCANCODE_INSERT: return "INSERT";
case SDL_SCANCODE_HOME: return "HOME";
case SDL_SCANCODE_PAGEUP: return "PAGEUP";
case SDL_SCANCODE_DELETE: return "DELETE";
case SDL_SCANCODE_END: return "END";
case SDL_SCANCODE_PAGEDOWN: return "PAGEDOWN";
case SDL_SCANCODE_RIGHT: return "RIGHT";
case SDL_SCANCODE_LEFT: return "LEFT";
case SDL_SCANCODE_DOWN: return "DOWN";
case SDL_SCANCODE_UP: return "UP";
case SDL_SCANCODE_NUMLOCKCLEAR: return "NUMLOCKCLEAR";
case SDL_SCANCODE_KP_DIVIDE: return "KP_DIVIDE";
case SDL_SCANCODE_KP_MULTIPLY: return "KP_MULTIPLY";
case SDL_SCANCODE_KP_MINUS: return "KP_MINUS";
case SDL_SCANCODE_KP_PLUS: return "KP_PLUS";
case SDL_SCANCODE_KP_ENTER: return "KP_ENTER";
case SDL_SCANCODE_KP_1: return "KP_1";
case SDL_SCANCODE_KP_2: return "KP_2";
case SDL_SCANCODE_KP_3: return "KP_3";
case SDL_SCANCODE_KP_4: return "KP_4";
case SDL_SCANCODE_KP_5: return "KP_5";
case SDL_SCANCODE_KP_6: return "KP_6";
case SDL_SCANCODE_KP_7: return "KP_7";
case SDL_SCANCODE_KP_8: return "KP_8";
case SDL_SCANCODE_KP_9: return "KP_9";
case SDL_SCANCODE_KP_0: return "KP_0";
case SDL_SCANCODE_KP_PERIOD: return "KP_PERIOD";
case SDL_SCANCODE_NONUSBACKSLASH: return "NONUSBACKSLASH";
case SDL_SCANCODE_APPLICATION: return "APPLICATION";
case SDL_SCANCODE_POWER: return "POWER";
case SDL_SCANCODE_KP_EQUALS: return "KP_EQUALS";
case SDL_SCANCODE_F13: return "F13";
case SDL_SCANCODE_F14: return "F14";
case SDL_SCANCODE_F15: return "F15";
case SDL_SCANCODE_F16: return "F16";
case SDL_SCANCODE_F17: return "F17";
case SDL_SCANCODE_F18: return "F18";
case SDL_SCANCODE_F19: return "F19";
case SDL_SCANCODE_F20: return "F20";
case SDL_SCANCODE_F21: return "F21";
case SDL_SCANCODE_F22: return "F22";
case SDL_SCANCODE_F23: return "F23";
case SDL_SCANCODE_F24: return "F24";
case SDL_SCANCODE_EXECUTE: return "EXECUTE";
case SDL_SCANCODE_HELP: return "HELP";
case SDL_SCANCODE_MENU: return "MENU";
case SDL_SCANCODE_SELECT: return "SELECT";
case SDL_SCANCODE_STOP: return "STOP";
case SDL_SCANCODE_AGAIN: return "AGAIN";
case SDL_SCANCODE_UNDO: return "UNDO";
case SDL_SCANCODE_CUT: return "CUT";
case SDL_SCANCODE_COPY: return "COPY";
case SDL_SCANCODE_PASTE: return "PASTE";
case SDL_SCANCODE_FIND: return "FIND";
case SDL_SCANCODE_MUTE: return "MUTE";
case SDL_SCANCODE_VOLUMEUP: return "VOLUMEUP";
case SDL_SCANCODE_VOLUMEDOWN: return "VOLUMEDOWN";
case SDL_SCANCODE_KP_COMMA: return "KP_COMMA";
case SDL_SCANCODE_KP_EQUALSAS400: return "KP_EQUALSAS400";
case SDL_SCANCODE_INTERNATIONAL1: return "INTERNATIONAL1";
case SDL_SCANCODE_INTERNATIONAL2: return "INTERNATIONAL2";
case SDL_SCANCODE_INTERNATIONAL3: return "INTERNATIONAL3";
case SDL_SCANCODE_INTERNATIONAL4: return "INTERNATIONAL4";
case SDL_SCANCODE_INTERNATIONAL5: return "INTERNATIONAL5";
case SDL_SCANCODE_INTERNATIONAL6: return "INTERNATIONAL6";
case SDL_SCANCODE_INTERNATIONAL7: return "INTERNATIONAL7";
case SDL_SCANCODE_INTERNATIONAL8: return "INTERNATIONAL8";
case SDL_SCANCODE_INTERNATIONAL9: return "INTERNATIONAL9";
case SDL_SCANCODE_LANG1: return "LANG1";
case SDL_SCANCODE_LANG2: return "LANG2";
case SDL_SCANCODE_LANG3: return "LANG3";
case SDL_SCANCODE_LANG4: return "LANG4";
case SDL_SCANCODE_LANG5: return "LANG5";
case SDL_SCANCODE_LANG6: return "LANG6";
case SDL_SCANCODE_LANG7: return "LANG7";
case SDL_SCANCODE_LANG8: return "LANG8";
case SDL_SCANCODE_LANG9: return "LANG9";
case SDL_SCANCODE_ALTERASE: return "ALTERASE";
case SDL_SCANCODE_SYSREQ: return "SYSREQ";
case SDL_SCANCODE_CANCEL: return "CANCEL";
case SDL_SCANCODE_CLEAR: return "CLEAR";
case SDL_SCANCODE_PRIOR: return "PRIOR";
case SDL_SCANCODE_RETURN2: return "RETURN2";
case SDL_SCANCODE_SEPARATOR: return "SEPARATOR";
case SDL_SCANCODE_OUT: return "OUT";
case SDL_SCANCODE_OPER: return "OPER";
case SDL_SCANCODE_CLEARAGAIN: return "CLEARAGAIN";
case SDL_SCANCODE_CRSEL: return "CRSEL";
case SDL_SCANCODE_EXSEL: return "EXSEL";
case SDL_SCANCODE_KP_00: return "KP_00";
case SDL_SCANCODE_KP_000: return "KP_000";
case SDL_SCANCODE_THOUSANDSSEPARATOR: return "THOUSANDSSEPARATOR";
case SDL_SCANCODE_DECIMALSEPARATOR: return "DECIMALSEPARATOR";
case SDL_SCANCODE_CURRENCYUNIT: return "CURRENCYUNIT";
case SDL_SCANCODE_CURRENCYSUBUNIT: return "CURRENCYSUBUNIT";
case SDL_SCANCODE_KP_LEFTPAREN: return "KP_LEFTPAREN";
case SDL_SCANCODE_KP_RIGHTPAREN: return "KP_RIGHTPAREN";
case SDL_SCANCODE_KP_LEFTBRACE: return "KP_LEFTBRACE";
case SDL_SCANCODE_KP_RIGHTBRACE: return "KP_RIGHTBRACE";
case SDL_SCANCODE_KP_TAB: return "KP_TAB";
case SDL_SCANCODE_KP_BACKSPACE: return "KP_BACKSPACE";
case SDL_SCANCODE_KP_A: return "KP_A";
case SDL_SCANCODE_KP_B: return "KP_B";
case SDL_SCANCODE_KP_C: return "KP_C";
case SDL_SCANCODE_KP_D: return "KP_D";
case SDL_SCANCODE_KP_E: return "KP_E";
case SDL_SCANCODE_KP_F: return "KP_F";
case SDL_SCANCODE_KP_XOR: return "KP_XOR";
case SDL_SCANCODE_KP_POWER: return "KP_POWER";
case SDL_SCANCODE_KP_PERCENT: return "KP_PERCENT";
case SDL_SCANCODE_KP_LESS: return "KP_LESS";
case SDL_SCANCODE_KP_GREATER: return "KP_GREATER";
case SDL_SCANCODE_KP_AMPERSAND: return "KP_AMPERSAND";
case SDL_SCANCODE_KP_DBLAMPERSAND: return "KP_DBLAMPERSAND";
case SDL_SCANCODE_KP_VERTICALBAR: return "KP_VERTICALBAR";
case SDL_SCANCODE_KP_DBLVERTICALBAR: return "KP_DBLVERTICALBAR";
case SDL_SCANCODE_KP_COLON: return "KP_COLON";
case SDL_SCANCODE_KP_HASH: return "KP_HASH";
case SDL_SCANCODE_KP_SPACE: return "KP_SPACE";
case SDL_SCANCODE_KP_AT: return "KP_AT";
case SDL_SCANCODE_KP_EXCLAM: return "KP_EXCLAM";
case SDL_SCANCODE_KP_MEMSTORE: return "KP_MEMSTORE";
case SDL_SCANCODE_KP_MEMRECALL: return "KP_MEMRECALL";
case SDL_SCANCODE_KP_MEMCLEAR: return "KP_MEMCLEAR";
case SDL_SCANCODE_KP_MEMADD: return "KP_MEMADD";
case SDL_SCANCODE_KP_MEMSUBTRACT: return "KP_MEMSUBTRACT";
case SDL_SCANCODE_KP_MEMMULTIPLY: return "KP_MEMMULTIPLY";
case SDL_SCANCODE_KP_MEMDIVIDE: return "KP_MEMDIVIDE";
case SDL_SCANCODE_KP_PLUSMINUS: return "KP_PLUSMINUS";
case SDL_SCANCODE_KP_CLEAR: return "KP_CLEAR";
case SDL_SCANCODE_KP_CLEARENTRY: return "KP_CLEARENTRY";
case SDL_SCANCODE_KP_BINARY: return "KP_BINARY";
case SDL_SCANCODE_KP_OCTAL: return "KP_OCTAL";
case SDL_SCANCODE_KP_DECIMAL: return "KP_DECIMAL";
case SDL_SCANCODE_KP_HEXADECIMAL: return "KP_HEXADECIMAL";
case SDL_SCANCODE_LCTRL: return "LCTRL";
case SDL_SCANCODE_LSHIFT: return "LSHIFT";
case SDL_SCANCODE_LALT: return "LALT";
case SDL_SCANCODE_LGUI: return "LGUI";
case SDL_SCANCODE_RCTRL: return "RCTRL";
case SDL_SCANCODE_RSHIFT: return "RSHIFT";
case SDL_SCANCODE_RALT: return "RALT";
case SDL_SCANCODE_RGUI: return "RGUI";
case SDL_SCANCODE_MODE: return "MODE";
case SDL_SCANCODE_AUDIONEXT: return "AUDIONEXT";
case SDL_SCANCODE_AUDIOPREV: return "AUDIOPREV";
case SDL_SCANCODE_AUDIOSTOP: return "AUDIOSTOP";
case SDL_SCANCODE_AUDIOPLAY: return "AUDIOPLAY";
case SDL_SCANCODE_AUDIOMUTE: return "AUDIOMUTE";
case SDL_SCANCODE_MEDIASELECT: return "MEDIASELECT";
case SDL_SCANCODE_WWW: return "WWW";
case SDL_SCANCODE_MAIL: return "MAIL";
case SDL_SCANCODE_CALCULATOR: return "CALCULATOR";
case SDL_SCANCODE_COMPUTER: return "COMPUTER";
case SDL_SCANCODE_AC_SEARCH: return "AC_SEARCH";
case SDL_SCANCODE_AC_HOME: return "AC_HOME";
case SDL_SCANCODE_AC_BACK: return "AC_BACK";
case SDL_SCANCODE_AC_FORWARD: return "AC_FORWARD";
case SDL_SCANCODE_AC_STOP: return "AC_STOP";
case SDL_SCANCODE_AC_REFRESH: return "AC_REFRESH";
case SDL_SCANCODE_AC_BOOKMARKS: return "AC_BOOKMARKS";
case SDL_SCANCODE_BRIGHTNESSDOWN: return "BRIGHTNESSDOWN";
case SDL_SCANCODE_BRIGHTNESSUP: return "BRIGHTNESSUP";
case SDL_SCANCODE_DISPLAYSWITCH: return "DISPLAYSWITCH";
case SDL_SCANCODE_KBDILLUMTOGGLE: return "KBDILLUMTOGGLE";
case SDL_SCANCODE_KBDILLUMDOWN: return "KBDILLUMDOWN";
case SDL_SCANCODE_KBDILLUMUP: return "KBDILLUMUP";
case SDL_SCANCODE_EJECT: return "EJECT";
case SDL_SCANCODE_SLEEP: return "SLEEP";
case SDL_SCANCODE_APP1: return "APP1";
case SDL_SCANCODE_APP2: return "APP2";
case SDL_SCANCODE_AUDIOREWIND: return "AUDIOREWIND";
case SDL_SCANCODE_AUDIOFASTFORWARD: return "AUDIOFASTFORWARD";
default: return "UNKNOWN";
}
}
const char *strsym(SDL_Keycode k)
{
switch (k) {
case SDLK_RETURN: return "RETURN";
case SDLK_ESCAPE: return "ESCAPE";
case SDLK_BACKSPACE: return "BACKSPACE";
case SDLK_TAB: return "TAB";
case SDLK_SPACE: return "SPACE";
case SDLK_EXCLAIM: return "EXCLAIM";
case SDLK_QUOTEDBL: return "QUOTEDBL";
case SDLK_HASH: return "HASH";
case SDLK_PERCENT: return "PERCENT";
case SDLK_DOLLAR: return "DOLLAR";
case SDLK_AMPERSAND: return "AMPERSAND";
case SDLK_QUOTE: return "QUOTE";
case SDLK_LEFTPAREN: return "LEFTPAREN";
case SDLK_RIGHTPAREN: return "RIGHTPAREN";
case SDLK_ASTERISK: return "ASTERISK";
case SDLK_PLUS: return "PLUS";
case SDLK_COMMA: return "COMMA";
case SDLK_MINUS: return "MINUS";
case SDLK_PERIOD: return "PERIOD";
case SDLK_SLASH: return "SLASH";
case SDLK_0: return "0";
case SDLK_1: return "1";
case SDLK_2: return "2";
case SDLK_3: return "3";
case SDLK_4: return "4";
case SDLK_5: return "5";
case SDLK_6: return "6";
case SDLK_7: return "7";
case SDLK_8: return "8";
case SDLK_9: return "9";
case SDLK_COLON: return "COLON";
case SDLK_SEMICOLON: return "SEMICOLON";
case SDLK_LESS: return "LESS";
case SDLK_EQUALS: return "EQUALS";
case SDLK_GREATER: return "GREATER";
case SDLK_QUESTION: return "QUESTION";
case SDLK_AT: return "AT";
case SDLK_LEFTBRACKET: return "LEFTBRACKET";
case SDLK_BACKSLASH: return "BACKSLASH";
case SDLK_RIGHTBRACKET: return "RIGHTBRACKET";
case SDLK_CARET: return "CARET";
case SDLK_UNDERSCORE: return "UNDERSCORE";
case SDLK_BACKQUOTE: return "BACKQUOTE";
case SDLK_a: return "a";
case SDLK_b: return "b";
case SDLK_c: return "c";
case SDLK_d: return "d";
case SDLK_e: return "e";
case SDLK_f: return "f";
case SDLK_g: return "g";
case SDLK_h: return "h";
case SDLK_i: return "i";
case SDLK_j: return "j";
case SDLK_k: return "k";
case SDLK_l: return "l";
case SDLK_m: return "m";
case SDLK_n: return "n";
case SDLK_o: return "o";
case SDLK_p: return "p";
case SDLK_q: return "q";
case SDLK_r: return "r";
case SDLK_s: return "s";
case SDLK_t: return "t";
case SDLK_u: return "u";
case SDLK_v: return "v";
case SDLK_w: return "w";
case SDLK_x: return "x";
case SDLK_y: return "y";
case SDLK_z: return "z";
case SDLK_CAPSLOCK: return "CAPSLOCK";
case SDLK_F1: return "F1";
case SDLK_F2: return "F2";
case SDLK_F3: return "F3";
case SDLK_F4: return "F4";
case SDLK_F5: return "F5";
case SDLK_F6: return "F6";
case SDLK_F7: return "F7";
case SDLK_F8: return "F8";
case SDLK_F9: return "F9";
case SDLK_F10: return "F10";
case SDLK_F11: return "F11";
case SDLK_F12: return "F12";
case SDLK_PRINTSCREEN: return "PRINTSCREEN";
case SDLK_SCROLLLOCK: return "SCROLLLOCK";
case SDLK_PAUSE: return "PAUSE";
case SDLK_INSERT: return "INSERT";
case SDLK_HOME: return "HOME";
case SDLK_PAGEUP: return "PAGEUP";
case SDLK_DELETE: return "DELETE";
case SDLK_END: return "END";
case SDLK_PAGEDOWN: return "PAGEDOWN";
case SDLK_RIGHT: return "RIGHT";
case SDLK_LEFT: return "LEFT";
case SDLK_DOWN: return "DOWN";
case SDLK_UP: return "UP";
case SDLK_NUMLOCKCLEAR: return "NUMLOCKCLEAR";
case SDLK_KP_DIVIDE: return "KP_DIVIDE";
case SDLK_KP_MULTIPLY: return "KP_MULTIPLY";
case SDLK_KP_MINUS: return "KP_MINUS";
case SDLK_KP_PLUS: return "KP_PLUS";
case SDLK_KP_ENTER: return "KP_ENTER";
case SDLK_KP_1: return "KP_1";
case SDLK_KP_2: return "KP_2";
case SDLK_KP_3: return "KP_3";
case SDLK_KP_4: return "KP_4";
case SDLK_KP_5: return "KP_5";
case SDLK_KP_6: return "KP_6";
case SDLK_KP_7: return "KP_7";
case SDLK_KP_8: return "KP_8";
case SDLK_KP_9: return "KP_9";
case SDLK_KP_0: return "KP_0";
case SDLK_KP_PERIOD: return "KP_PERIOD";
case SDLK_APPLICATION: return "APPLICATION";
case SDLK_POWER: return "POWER";
case SDLK_KP_EQUALS: return "KP_EQUALS";
case SDLK_F13: return "F13";
case SDLK_F14: return "F14";
case SDLK_F15: return "F15";
case SDLK_F16: return "F16";
case SDLK_F17: return "F17";
case SDLK_F18: return "F18";
case SDLK_F19: return "F19";
case SDLK_F20: return "F20";
case SDLK_F21: return "F21";
case SDLK_F22: return "F22";
case SDLK_F23: return "F23";
case SDLK_F24: return "F24";
case SDLK_EXECUTE: return "EXECUTE";
case SDLK_HELP: return "HELP";
case SDLK_MENU: return "MENU";
case SDLK_SELECT: return "SELECT";
case SDLK_STOP: return "STOP";
case SDLK_AGAIN: return "AGAIN";
case SDLK_UNDO: return "UNDO";
case SDLK_CUT: return "CUT";
case SDLK_COPY: return "COPY";
case SDLK_PASTE: return "PASTE";
case SDLK_FIND: return "FIND";
case SDLK_MUTE: return "MUTE";
case SDLK_VOLUMEUP: return "VOLUMEUP";
case SDLK_VOLUMEDOWN: return "VOLUMEDOWN";
case SDLK_KP_COMMA: return "KP_COMMA";
case SDLK_KP_EQUALSAS400: return "KP_EQUALSAS400";
case SDLK_ALTERASE: return "ALTERASE";
case SDLK_SYSREQ: return "SYSREQ";
case SDLK_CANCEL: return "CANCEL";
case SDLK_CLEAR: return "CLEAR";
case SDLK_PRIOR: return "PRIOR";
case SDLK_RETURN2: return "RETURN2";
case SDLK_SEPARATOR: return "SEPARATOR";
case SDLK_OUT: return "OUT";
case SDLK_OPER: return "OPER";
case SDLK_CLEARAGAIN: return "CLEARAGAIN";
case SDLK_CRSEL: return "CRSEL";
case SDLK_EXSEL: return "EXSEL";
case SDLK_KP_00: return "KP_00";
case SDLK_KP_000: return "KP_000";
case SDLK_THOUSANDSSEPARATOR: return "THOUSANDSSEPARATOR";
case SDLK_DECIMALSEPARATOR: return "DECIMALSEPARATOR";
case SDLK_CURRENCYUNIT: return "CURRENCYUNIT";
case SDLK_CURRENCYSUBUNIT: return "CURRENCYSUBUNIT";
case SDLK_KP_LEFTPAREN: return "KP_LEFTPAREN";
case SDLK_KP_RIGHTPAREN: return "KP_RIGHTPAREN";
case SDLK_KP_LEFTBRACE: return "KP_LEFTBRACE";
case SDLK_KP_RIGHTBRACE: return "KP_RIGHTBRACE";
case SDLK_KP_TAB: return "KP_TAB";
case SDLK_KP_BACKSPACE: return "KP_BACKSPACE";
case SDLK_KP_A: return "KP_A";
case SDLK_KP_B: return "KP_B";
case SDLK_KP_C: return "KP_C";
case SDLK_KP_D: return "KP_D";
case SDLK_KP_E: return "KP_E";
case SDLK_KP_F: return "KP_F";
case SDLK_KP_XOR: return "KP_XOR";
case SDLK_KP_POWER: return "KP_POWER";
case SDLK_KP_PERCENT: return "KP_PERCENT";
case SDLK_KP_LESS: return "KP_LESS";
case SDLK_KP_GREATER: return "KP_GREATER";
case SDLK_KP_AMPERSAND: return "KP_AMPERSAND";
case SDLK_KP_DBLAMPERSAND: return "KP_DBLAMPERSAND";
case SDLK_KP_VERTICALBAR: return "KP_VERTICALBAR";
case SDLK_KP_DBLVERTICALBAR: return "KP_DBLVERTICALBAR";
case SDLK_KP_COLON: return "KP_COLON";
case SDLK_KP_HASH: return "KP_HASH";
case SDLK_KP_SPACE: return "KP_SPACE";
case SDLK_KP_AT: return "KP_AT";
case SDLK_KP_EXCLAM: return "KP_EXCLAM";
case SDLK_KP_MEMSTORE: return "KP_MEMSTORE";
case SDLK_KP_MEMRECALL: return "KP_MEMRECALL";
case SDLK_KP_MEMCLEAR: return "KP_MEMCLEAR";
case SDLK_KP_MEMADD: return "KP_MEMADD";
case SDLK_KP_MEMSUBTRACT: return "KP_MEMSUBTRACT";
case SDLK_KP_MEMMULTIPLY: return "KP_MEMMULTIPLY";
case SDLK_KP_MEMDIVIDE: return "KP_MEMDIVIDE";
case SDLK_KP_PLUSMINUS: return "KP_PLUSMINUS";
case SDLK_KP_CLEAR: return "KP_CLEAR";
case SDLK_KP_CLEARENTRY: return "KP_CLEARENTRY";
case SDLK_KP_BINARY: return "KP_BINARY";
case SDLK_KP_OCTAL: return "KP_OCTAL";
case SDLK_KP_DECIMAL: return "KP_DECIMAL";
case SDLK_KP_HEXADECIMAL: return "KP_HEXADECIMAL";
case SDLK_LCTRL: return "LCTRL";
case SDLK_LSHIFT: return "LSHIFT";
case SDLK_LALT: return "LALT";
case SDLK_LGUI: return "LGUI";
case SDLK_RCTRL: return "RCTRL";
case SDLK_RSHIFT: return "RSHIFT";
case SDLK_RALT: return "RALT";
case SDLK_RGUI: return "RGUI";
case SDLK_MODE: return "MODE";
case SDLK_AUDIONEXT: return "AUDIONEXT";
case SDLK_AUDIOPREV: return "AUDIOPREV";
case SDLK_AUDIOSTOP: return "AUDIOSTOP";
case SDLK_AUDIOPLAY: return "AUDIOPLAY";
case SDLK_AUDIOMUTE: return "AUDIOMUTE";
case SDLK_MEDIASELECT: return "MEDIASELECT";
case SDLK_WWW: return "WWW";
case SDLK_MAIL: return "MAIL";
case SDLK_CALCULATOR: return "CALCULATOR";
case SDLK_COMPUTER: return "COMPUTER";
case SDLK_AC_SEARCH: return "AC_SEARCH";
case SDLK_AC_HOME: return "AC_HOME";
case SDLK_AC_BACK: return "AC_BACK";
case SDLK_AC_FORWARD: return "AC_FORWARD";
case SDLK_AC_STOP: return "AC_STOP";
case SDLK_AC_REFRESH: return "AC_REFRESH";
case SDLK_AC_BOOKMARKS: return "AC_BOOKMARKS";
case SDLK_BRIGHTNESSDOWN: return "BRIGHTNESSDOWN";
case SDLK_BRIGHTNESSUP: return "BRIGHTNESSUP";
case SDLK_DISPLAYSWITCH: return "DISPLAYSWITCH";
case SDLK_KBDILLUMTOGGLE: return "KBDILLUMTOGGLE";
case SDLK_KBDILLUMDOWN: return "KBDILLUMDOWN";
case SDLK_KBDILLUMUP: return "KBDILLUMUP";
case SDLK_EJECT: return "EJECT";
case SDLK_SLEEP: return "SLEEP";
case SDLK_APP1: return "APP1";
case SDLK_APP2: return "APP2";
case SDLK_AUDIOREWIND: return "AUDIOREWIND";
case SDLK_AUDIOFASTFORWARD: return "AUDIOFASTFORWARD";
default: return "UNKNOWN";
}
}
|