kick
/Users/morten/Programmering/cpp/kick/src/kick/core/key_input_enum.h
00001 #pragma once
00002 
00003 #include <cstdint>
00004 
00005 namespace kick {
00006     typedef enum {
00007         SDL_SCANCODE_UNKNOWN = 0,
00013         /* @{ */
00014 
00015                 SDL_SCANCODE_A = 4,
00016         SDL_SCANCODE_B = 5,
00017         SDL_SCANCODE_C = 6,
00018         SDL_SCANCODE_D = 7,
00019         SDL_SCANCODE_E = 8,
00020         SDL_SCANCODE_F = 9,
00021         SDL_SCANCODE_G = 10,
00022         SDL_SCANCODE_H = 11,
00023         SDL_SCANCODE_I = 12,
00024         SDL_SCANCODE_J = 13,
00025         SDL_SCANCODE_K = 14,
00026         SDL_SCANCODE_L = 15,
00027         SDL_SCANCODE_M = 16,
00028         SDL_SCANCODE_N = 17,
00029         SDL_SCANCODE_O = 18,
00030         SDL_SCANCODE_P = 19,
00031         SDL_SCANCODE_Q = 20,
00032         SDL_SCANCODE_R = 21,
00033         SDL_SCANCODE_S = 22,
00034         SDL_SCANCODE_T = 23,
00035         SDL_SCANCODE_U = 24,
00036         SDL_SCANCODE_V = 25,
00037         SDL_SCANCODE_W = 26,
00038         SDL_SCANCODE_X = 27,
00039         SDL_SCANCODE_Y = 28,
00040         SDL_SCANCODE_Z = 29,
00041 
00042         SDL_SCANCODE_1 = 30,
00043         SDL_SCANCODE_2 = 31,
00044         SDL_SCANCODE_3 = 32,
00045         SDL_SCANCODE_4 = 33,
00046         SDL_SCANCODE_5 = 34,
00047         SDL_SCANCODE_6 = 35,
00048         SDL_SCANCODE_7 = 36,
00049         SDL_SCANCODE_8 = 37,
00050         SDL_SCANCODE_9 = 38,
00051         SDL_SCANCODE_0 = 39,
00052 
00053         SDL_SCANCODE_RETURN = 40,
00054         SDL_SCANCODE_ESCAPE = 41,
00055         SDL_SCANCODE_BACKSPACE = 42,
00056         SDL_SCANCODE_TAB = 43,
00057         SDL_SCANCODE_SPACE = 44,
00058 
00059         SDL_SCANCODE_MINUS = 45,
00060         SDL_SCANCODE_EQUALS = 46,
00061         SDL_SCANCODE_LEFTBRACKET = 47,
00062         SDL_SCANCODE_RIGHTBRACKET = 48,
00063         SDL_SCANCODE_BACKSLASH = 49,
00078                 SDL_SCANCODE_NONUSHASH = 50,
00091                 SDL_SCANCODE_SEMICOLON = 51,
00092     SDL_SCANCODE_APOSTROPHE = 52,
00093     SDL_SCANCODE_GRAVE = 53,
00111                 SDL_SCANCODE_COMMA = 54,
00112     SDL_SCANCODE_PERIOD = 55,
00113     SDL_SCANCODE_SLASH = 56,
00114 
00115     SDL_SCANCODE_CAPSLOCK = 57,
00116 
00117     SDL_SCANCODE_F1 = 58,
00118     SDL_SCANCODE_F2 = 59,
00119     SDL_SCANCODE_F3 = 60,
00120     SDL_SCANCODE_F4 = 61,
00121     SDL_SCANCODE_F5 = 62,
00122     SDL_SCANCODE_F6 = 63,
00123     SDL_SCANCODE_F7 = 64,
00124     SDL_SCANCODE_F8 = 65,
00125     SDL_SCANCODE_F9 = 66,
00126     SDL_SCANCODE_F10 = 67,
00127     SDL_SCANCODE_F11 = 68,
00128     SDL_SCANCODE_F12 = 69,
00129 
00130     SDL_SCANCODE_PRINTSCREEN = 70,
00131     SDL_SCANCODE_SCROLLLOCK = 71,
00132     SDL_SCANCODE_PAUSE = 72,
00133     SDL_SCANCODE_INSERT = 73,
00136             SDL_SCANCODE_HOME = 74,
00137     SDL_SCANCODE_PAGEUP = 75,
00138     SDL_SCANCODE_DELETE = 76,
00139     SDL_SCANCODE_END = 77,
00140     SDL_SCANCODE_PAGEDOWN = 78,
00141     SDL_SCANCODE_RIGHT = 79,
00142     SDL_SCANCODE_LEFT = 80,
00143     SDL_SCANCODE_DOWN = 81,
00144     SDL_SCANCODE_UP =
00145 
00146     82,
00147 
00148     SDL_SCANCODE_NUMLOCKCLEAR = 83,
00151                 SDL_SCANCODE_KP_DIVIDE = 84,
00152         SDL_SCANCODE_KP_MULTIPLY = 85,
00153         SDL_SCANCODE_KP_MINUS = 86,
00154         SDL_SCANCODE_KP_PLUS = 87,
00155         SDL_SCANCODE_KP_ENTER = 88,
00156         SDL_SCANCODE_KP_1 = 89,
00157         SDL_SCANCODE_KP_2 = 90,
00158         SDL_SCANCODE_KP_3 = 91,
00159         SDL_SCANCODE_KP_4 = 92,
00160         SDL_SCANCODE_KP_5 = 93,
00161         SDL_SCANCODE_KP_6 = 94,
00162         SDL_SCANCODE_KP_7 = 95,
00163         SDL_SCANCODE_KP_8 = 96,
00164         SDL_SCANCODE_KP_9 = 97,
00165         SDL_SCANCODE_KP_0 = 98,
00166 
00167         SDL_SCANCODE_KP_PERIOD = 99,
00168 
00169     SDL_SCANCODE_NONUSBACKSLASH = 100,
00180             SDL_SCANCODE_APPLICATION = 101, 
00181                 SDL_SCANCODE_POWER = 102,
00185             SDL_SCANCODE_KP_EQUALS = 103,
00186         SDL_SCANCODE_F13 = 104,
00187         SDL_SCANCODE_F14 = 105,
00188         SDL_SCANCODE_F15 = 106,
00189         SDL_SCANCODE_F16 = 107,
00190         SDL_SCANCODE_F17 = 108,
00191         SDL_SCANCODE_F18 = 109,
00192         SDL_SCANCODE_F19 = 110,
00193         SDL_SCANCODE_F20 = 111,
00194         SDL_SCANCODE_F21 = 112,
00195         SDL_SCANCODE_F22 = 113,
00196         SDL_SCANCODE_F23 = 114,
00197         SDL_SCANCODE_F24 = 115,
00198         SDL_SCANCODE_EXECUTE = 116,
00199         SDL_SCANCODE_HELP = 117,
00200         SDL_SCANCODE_MENU = 118,
00201         SDL_SCANCODE_SELECT = 119,
00202         SDL_SCANCODE_STOP = 120,
00203         SDL_SCANCODE_AGAIN = 121, 
00204                 SDL_SCANCODE_UNDO = 122,
00205         SDL_SCANCODE_CUT = 123,
00206         SDL_SCANCODE_COPY = 124,
00207         SDL_SCANCODE_PASTE = 125,
00208         SDL_SCANCODE_FIND = 126,
00209         SDL_SCANCODE_MUTE = 127,
00210         SDL_SCANCODE_VOLUMEUP = 128,
00211         SDL_SCANCODE_VOLUMEDOWN = 129,
00212 /* not sure whether there's a reason to enable these */
00213 /*     SDL_SCANCODE_LOCKINGCAPSLOCK = 130,  */
00214 /*     SDL_SCANCODE_LOCKINGNUMLOCK = 131, */
00215 /*     SDL_SCANCODE_LOCKINGSCROLLLOCK = 132, */
00216                 SDL_SCANCODE_KP_COMMA = 133,
00217         SDL_SCANCODE_KP_EQUALSAS400 = 134,
00218 
00219         SDL_SCANCODE_INTERNATIONAL1 = 135,
00222             SDL_SCANCODE_INTERNATIONAL2 = 136,
00223     SDL_SCANCODE_INTERNATIONAL3 = 137, 
00224             SDL_SCANCODE_INTERNATIONAL4 = 138,
00225     SDL_SCANCODE_INTERNATIONAL5 = 139,
00226     SDL_SCANCODE_INTERNATIONAL6 = 140,
00227     SDL_SCANCODE_INTERNATIONAL7 = 141,
00228     SDL_SCANCODE_INTERNATIONAL8 = 142,
00229     SDL_SCANCODE_INTERNATIONAL9 = 143,
00230     SDL_SCANCODE_LANG1 = 144, 
00231             SDL_SCANCODE_LANG2 = 145, 
00232             SDL_SCANCODE_LANG3 = 146, 
00233             SDL_SCANCODE_LANG4 = 147, 
00234             SDL_SCANCODE_LANG5 = 148, 
00235             SDL_SCANCODE_LANG6 = 149, 
00236             SDL_SCANCODE_LANG7 = 150, 
00237             SDL_SCANCODE_LANG8 = 151, 
00238             SDL_SCANCODE_LANG9 = 152, 
00240             SDL_SCANCODE_ALTERASE = 153, 
00241             SDL_SCANCODE_SYSREQ = 154,
00242     SDL_SCANCODE_CANCEL = 155,
00243     SDL_SCANCODE_CLEAR = 156,
00244     SDL_SCANCODE_PRIOR = 157,
00245     SDL_SCANCODE_RETURN2 = 158,
00246     SDL_SCANCODE_SEPARATOR = 159,
00247     SDL_SCANCODE_OUT = 160,
00248     SDL_SCANCODE_OPER = 161,
00249     SDL_SCANCODE_CLEARAGAIN = 162,
00250     SDL_SCANCODE_CRSEL = 163,
00251     SDL_SCANCODE_EXSEL = 164,
00252 
00253     SDL_SCANCODE_KP_00 = 176,
00254     SDL_SCANCODE_KP_000 = 177,
00255     SDL_SCANCODE_THOUSANDSSEPARATOR = 178,
00256     SDL_SCANCODE_DECIMALSEPARATOR = 179,
00257     SDL_SCANCODE_CURRENCYUNIT = 180,
00258     SDL_SCANCODE_CURRENCYSUBUNIT = 181,
00259     SDL_SCANCODE_KP_LEFTPAREN = 182,
00260     SDL_SCANCODE_KP_RIGHTPAREN = 183,
00261     SDL_SCANCODE_KP_LEFTBRACE = 184,
00262     SDL_SCANCODE_KP_RIGHTBRACE = 185,
00263     SDL_SCANCODE_KP_TAB = 186,
00264     SDL_SCANCODE_KP_BACKSPACE = 187,
00265     SDL_SCANCODE_KP_A = 188,
00266     SDL_SCANCODE_KP_B = 189,
00267     SDL_SCANCODE_KP_C = 190,
00268     SDL_SCANCODE_KP_D = 191,
00269     SDL_SCANCODE_KP_E = 192,
00270     SDL_SCANCODE_KP_F = 193,
00271     SDL_SCANCODE_KP_XOR = 194,
00272     SDL_SCANCODE_KP_POWER = 195,
00273     SDL_SCANCODE_KP_PERCENT = 196,
00274     SDL_SCANCODE_KP_LESS = 197,
00275     SDL_SCANCODE_KP_GREATER = 198,
00276     SDL_SCANCODE_KP_AMPERSAND = 199,
00277     SDL_SCANCODE_KP_DBLAMPERSAND = 200,
00278     SDL_SCANCODE_KP_VERTICALBAR = 201,
00279     SDL_SCANCODE_KP_DBLVERTICALBAR = 202,
00280     SDL_SCANCODE_KP_COLON = 203,
00281     SDL_SCANCODE_KP_HASH = 204,
00282     SDL_SCANCODE_KP_SPACE = 205,
00283     SDL_SCANCODE_KP_AT = 206,
00284     SDL_SCANCODE_KP_EXCLAM = 207,
00285     SDL_SCANCODE_KP_MEMSTORE = 208,
00286     SDL_SCANCODE_KP_MEMRECALL = 209,
00287     SDL_SCANCODE_KP_MEMCLEAR = 210,
00288     SDL_SCANCODE_KP_MEMADD = 211,
00289     SDL_SCANCODE_KP_MEMSUBTRACT = 212,
00290     SDL_SCANCODE_KP_MEMMULTIPLY = 213,
00291     SDL_SCANCODE_KP_MEMDIVIDE = 214,
00292     SDL_SCANCODE_KP_PLUSMINUS = 215,
00293     SDL_SCANCODE_KP_CLEAR = 216,
00294     SDL_SCANCODE_KP_CLEARENTRY = 217,
00295     SDL_SCANCODE_KP_BINARY = 218,
00296     SDL_SCANCODE_KP_OCTAL = 219,
00297     SDL_SCANCODE_KP_DECIMAL = 220,
00298     SDL_SCANCODE_KP_HEXADECIMAL = 221,
00299 
00300     SDL_SCANCODE_LCTRL = 224,
00301     SDL_SCANCODE_LSHIFT = 225,
00302     SDL_SCANCODE_LALT = 226, 
00303             SDL_SCANCODE_LGUI = 227, 
00304             SDL_SCANCODE_RCTRL = 228,
00305     SDL_SCANCODE_RSHIFT = 229,
00306     SDL_SCANCODE_RALT = 230, 
00307             SDL_SCANCODE_RGUI = 231, 
00309             SDL_SCANCODE_MODE = 257,
00310 
00316     /* @} *//* Usage page 0x07 */
00322     /* @{ */
00323 
00324             SDL_SCANCODE_AUDIONEXT = 258,
00325         SDL_SCANCODE_AUDIOPREV = 259,
00326         SDL_SCANCODE_AUDIOSTOP = 260,
00327         SDL_SCANCODE_AUDIOPLAY = 261,
00328         SDL_SCANCODE_AUDIOMUTE = 262,
00329         SDL_SCANCODE_MEDIASELECT = 263,
00330     SDL_SCANCODE_WWW =
00331     264,
00332         SDL_SCANCODE_MAIL = 265,
00333         SDL_SCANCODE_CALCULATOR = 266,
00334         SDL_SCANCODE_COMPUTER = 267,
00335         SDL_SCANCODE_AC_SEARCH = 268,
00336         SDL_SCANCODE_AC_HOME = 269,
00337         SDL_SCANCODE_AC_BACK = 270,
00338         SDL_SCANCODE_AC_FORWARD = 271,
00339         SDL_SCANCODE_AC_STOP = 272,
00340         SDL_SCANCODE_AC_REFRESH = 273,
00341         SDL_SCANCODE_AC_BOOKMARKS = 274,
00342 
00343     /* @} */
00344 
00345         /* Usage page 0x0C */
00351     /* @{ */
00352             SDL_SCANCODE_BRIGHTNESSDOWN =
00353 
00354             275,
00355         SDL_SCANCODE_BRIGHTNESSUP = 276,
00356         SDL_SCANCODE_DISPLAYSWITCH = 277,
00359             SDL_SCANCODE_KBDILLUMTOGGLE = 278,
00360         SDL_SCANCODE_KBDILLUMDOWN = 279,
00361         SDL_SCANCODE_KBDILLUMUP = 280,
00362         SDL_SCANCODE_EJECT = 281,
00363         SDL_SCANCODE_SLEEP = 282,
00364 
00365         SDL_SCANCODE_APP1 = 283,
00366         SDL_SCANCODE_APP2 = 284,
00367 
00368     /* @} */
00369 
00370         /* Walther keys */
00371 
00372         /* Add any other keys here. */
00373 
00374                 SDL_NUM_SCANCODES = 512
00377 } SDL_Scancode;
00378 
00379 // SDL dependency
00380 typedef int32_t Sint32;
00381 
00382 #ifndef SDLK_SCANCODE_MASK
00383 #define SDLK_SCANCODE_MASK (1<<30)
00384 #endif
00385 #ifndef SDL_SCANCODE_TO_KEYCODE
00386 #define SDL_SCANCODE_TO_KEYCODE(X)  (X | SDLK_SCANCODE_MASK)
00387 #endif
00388 
00389 enum
00390 {
00391     SDLK_UNKNOWN
00392     = 0,
00393 
00394     SDLK_RETURN = '\r',
00395     SDLK_ESCAPE = '\033',
00396     SDLK_BACKSPACE = '\b',
00397     SDLK_TAB
00398     = '\t',
00399     SDLK_SPACE = ' ',
00400     SDLK_EXCLAIM = '!',
00401     SDLK_QUOTEDBL = '"',
00402     SDLK_HASH = '#',
00403     SDLK_PERCENT = '%',
00404     SDLK_DOLLAR = '$',
00405     SDLK_AMPERSAND = '&',
00406     SDLK_QUOTE = '\'',
00407     SDLK_LEFTPAREN = '(',
00408     SDLK_RIGHTPAREN = ')',
00409     SDLK_ASTERISK = '*',
00410     SDLK_PLUS = '+',
00411     SDLK_COMMA = ',',
00412     SDLK_MINUS = '-',
00413     SDLK_PERIOD = '.',
00414     SDLK_SLASH = '/',
00415     SDLK_0 = '0',
00416     SDLK_1 = '1',
00417     SDLK_2 = '2',
00418     SDLK_3 = '3',
00419     SDLK_4 = '4',
00420     SDLK_5 = '5',
00421     SDLK_6 = '6',
00422     SDLK_7 = '7',
00423     SDLK_8 = '8',
00424     SDLK_9 = '9',
00425     SDLK_COLON = ':',
00426     SDLK_SEMICOLON = ';',
00427     SDLK_LESS = '<',
00428     SDLK_EQUALS = '=',
00429     SDLK_GREATER = '>',
00430     SDLK_QUESTION = '?',
00431     SDLK_AT = '@',
00432     /*
00433    Skip uppercase letters
00434  */
00435             SDLK_LEFTBRACKET = '[',
00436     SDLK_BACKSLASH = '\\',
00437     SDLK_RIGHTBRACKET = ']',
00438     SDLK_CARET = '^',
00439     SDLK_UNDERSCORE = '_',
00440     SDLK_BACKQUOTE = '`',
00441     SDLK_a = 'a',
00442     SDLK_b = 'b',
00443     SDLK_c = 'c',
00444     SDLK_d = 'd',
00445     SDLK_e = 'e',
00446     SDLK_f = 'f',
00447     SDLK_g = 'g',
00448     SDLK_h = 'h',
00449     SDLK_i = 'i',
00450     SDLK_j = 'j',
00451     SDLK_k = 'k',
00452     SDLK_l = 'l',
00453     SDLK_m = 'm',
00454     SDLK_n = 'n',
00455     SDLK_o = 'o',
00456     SDLK_p = 'p',
00457     SDLK_q = 'q',
00458     SDLK_r = 'r',
00459     SDLK_s = 's',
00460     SDLK_t = 't',
00461     SDLK_u = 'u',
00462     SDLK_v = 'v',
00463     SDLK_w = 'w',
00464     SDLK_x = 'x',
00465     SDLK_y = 'y',
00466     SDLK_z = 'z',
00467 
00468     SDLK_CAPSLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK),
00469 
00470     SDLK_F1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1),
00471     SDLK_F2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2),
00472     SDLK_F3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3),
00473     SDLK_F4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4),
00474     SDLK_F5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5),
00475     SDLK_F6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6),
00476     SDLK_F7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7),
00477     SDLK_F8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8),
00478     SDLK_F9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9),
00479     SDLK_F10 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10),
00480     SDLK_F11 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11),
00481     SDLK_F12 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12),
00482 
00483     SDLK_PRINTSCREEN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN),
00484     SDLK_SCROLLLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK),
00485     SDLK_PAUSE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE),
00486     SDLK_INSERT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT),
00487     SDLK_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME),
00488     SDLK_PAGEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP),
00489     SDLK_DELETE = '\177',
00490     SDLK_END = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END),
00491     SDLK_PAGEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN),
00492     SDLK_RIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT),
00493     SDLK_LEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT),
00494     SDLK_DOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN),
00495     SDLK_UP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP),
00496 
00497     SDLK_NUMLOCKCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR),
00498     SDLK_KP_DIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE),
00499     SDLK_KP_MULTIPLY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY),
00500     SDLK_KP_MINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS),
00501     SDLK_KP_PLUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS),
00502     SDLK_KP_ENTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER),
00503     SDLK_KP_1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1),
00504     SDLK_KP_2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2),
00505     SDLK_KP_3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3),
00506     SDLK_KP_4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4),
00507     SDLK_KP_5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5),
00508     SDLK_KP_6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6),
00509     SDLK_KP_7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7),
00510     SDLK_KP_8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8),
00511     SDLK_KP_9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9),
00512     SDLK_KP_0 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0),
00513     SDLK_KP_PERIOD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD),
00514 
00515     SDLK_APPLICATION = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION),
00516     SDLK_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER),
00517     SDLK_KP_EQUALS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS),
00518     SDLK_F13 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13),
00519     SDLK_F14 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14),
00520     SDLK_F15 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15),
00521     SDLK_F16 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16),
00522     SDLK_F17 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17),
00523     SDLK_F18 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18),
00524     SDLK_F19 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19),
00525     SDLK_F20 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20),
00526     SDLK_F21 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21),
00527     SDLK_F22 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22),
00528     SDLK_F23 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23),
00529     SDLK_F24 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24),
00530     SDLK_EXECUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE),
00531     SDLK_HELP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP),
00532     SDLK_MENU = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU),
00533     SDLK_SELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT),
00534     SDLK_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP),
00535     SDLK_AGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN),
00536     SDLK_UNDO = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO),
00537     SDLK_CUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT),
00538     SDLK_COPY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY),
00539     SDLK_PASTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE),
00540     SDLK_FIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND),
00541     SDLK_MUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE),
00542     SDLK_VOLUMEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP),
00543     SDLK_VOLUMEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN),
00544     SDLK_KP_COMMA = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA),
00545     SDLK_KP_EQUALSAS400 =
00546     SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400),
00547 
00548     SDLK_ALTERASE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE),
00549     SDLK_SYSREQ = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ),
00550     SDLK_CANCEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL),
00551     SDLK_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR),
00552     SDLK_PRIOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR),
00553     SDLK_RETURN2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2),
00554     SDLK_SEPARATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR),
00555     SDLK_OUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT),
00556     SDLK_OPER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER),
00557     SDLK_CLEARAGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN),
00558     SDLK_CRSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL),
00559     SDLK_EXSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL),
00560 
00561     SDLK_KP_00 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00),
00562     SDLK_KP_000 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000),
00563     SDLK_THOUSANDSSEPARATOR =
00564     SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR),
00565     SDLK_DECIMALSEPARATOR =
00566     SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR),
00567     SDLK_CURRENCYUNIT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT),
00568     SDLK_CURRENCYSUBUNIT =
00569     SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT),
00570     SDLK_KP_LEFTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN),
00571     SDLK_KP_RIGHTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN),
00572     SDLK_KP_LEFTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE),
00573     SDLK_KP_RIGHTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE),
00574     SDLK_KP_TAB = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB),
00575     SDLK_KP_BACKSPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE),
00576     SDLK_KP_A = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A),
00577     SDLK_KP_B = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B),
00578     SDLK_KP_C = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C),
00579     SDLK_KP_D = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D),
00580     SDLK_KP_E = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E),
00581     SDLK_KP_F = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F),
00582     SDLK_KP_XOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR),
00583     SDLK_KP_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER),
00584     SDLK_KP_PERCENT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT),
00585     SDLK_KP_LESS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS),
00586     SDLK_KP_GREATER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER),
00587     SDLK_KP_AMPERSAND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND),
00588     SDLK_KP_DBLAMPERSAND =
00589     SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND),
00590     SDLK_KP_VERTICALBAR =
00591     SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR),
00592     SDLK_KP_DBLVERTICALBAR =
00593     SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR),
00594     SDLK_KP_COLON = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON),
00595     SDLK_KP_HASH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH),
00596     SDLK_KP_SPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE),
00597     SDLK_KP_AT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT),
00598     SDLK_KP_EXCLAM = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM),
00599     SDLK_KP_MEMSTORE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE),
00600     SDLK_KP_MEMRECALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL),
00601     SDLK_KP_MEMCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR),
00602     SDLK_KP_MEMADD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD),
00603     SDLK_KP_MEMSUBTRACT =
00604     SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT),
00605     SDLK_KP_MEMMULTIPLY =
00606     SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY),
00607     SDLK_KP_MEMDIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE),
00608     SDLK_KP_PLUSMINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS),
00609     SDLK_KP_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR),
00610     SDLK_KP_CLEARENTRY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY),
00611     SDLK_KP_BINARY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY),
00612     SDLK_KP_OCTAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL),
00613     SDLK_KP_DECIMAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL),
00614     SDLK_KP_HEXADECIMAL =
00615     SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL),
00616 
00617     SDLK_LCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL),
00618     SDLK_LSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT),
00619     SDLK_LALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT),
00620     SDLK_LGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI),
00621     SDLK_RCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL),
00622     SDLK_RSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT),
00623     SDLK_RALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT),
00624     SDLK_RGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI),
00625 
00626     SDLK_MODE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE),
00627 
00628     SDLK_AUDIONEXT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIONEXT),
00629     SDLK_AUDIOPREV = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPREV),
00630     SDLK_AUDIOSTOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOSTOP),
00631     SDLK_AUDIOPLAY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPLAY),
00632     SDLK_AUDIOMUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOMUTE),
00633     SDLK_MEDIASELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIASELECT),
00634     SDLK_WWW = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WWW),
00635     SDLK_MAIL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MAIL),
00636     SDLK_CALCULATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALCULATOR),
00637     SDLK_COMPUTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COMPUTER),
00638     SDLK_AC_SEARCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH),
00639     SDLK_AC_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME),
00640     SDLK_AC_BACK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK),
00641     SDLK_AC_FORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD),
00642     SDLK_AC_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP),
00643     SDLK_AC_REFRESH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH),
00644     SDLK_AC_BOOKMARKS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS),
00645 
00646     SDLK_BRIGHTNESSDOWN =
00647     SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSDOWN),
00648     SDLK_BRIGHTNESSUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSUP),
00649     SDLK_DISPLAYSWITCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DISPLAYSWITCH),
00650     SDLK_KBDILLUMTOGGLE =
00651     SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMTOGGLE),
00652     SDLK_KBDILLUMDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN),
00653     SDLK_KBDILLUMUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP),
00654     SDLK_EJECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT),
00655     SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP)
00656 };
00660     typedef enum
00661 {
00662         KMOD_NONE
00663         = 0x0000,
00664         KMOD_LSHIFT = 0x0001,
00665         KMOD_RSHIFT = 0x0002,
00666         KMOD_LCTRL = 0x0040,
00667         KMOD_RCTRL = 0x0080,
00668         KMOD_LALT = 0x0100,
00669         KMOD_RALT = 0x0200,
00670         KMOD_LGUI = 0x0400,
00671         KMOD_RGUI = 0x0800,
00672         KMOD_NUM = 0x1000,
00673         KMOD_CAPS = 0x2000,
00674         KMOD_MODE = 0x4000,
00675         KMOD_RESERVED = 0x8000
00676 }
00677             SDL_Keymod;
00678 
00679 #define KMOD_CTRL   (KMOD_LCTRL|KMOD_RCTRL)
00680 #define KMOD_SHIFT  (KMOD_LSHIFT|KMOD_RSHIFT)
00681 #define KMOD_ALT    (KMOD_LALT|KMOD_RALT)
00682 #define KMOD_GUI    (KMOD_LGUI|KMOD_RGUI)
00683 }
 All Classes Functions Variables