enum sdl12 {
K_UNKNOWN= 0,
K_FIRST= 0,
K_BACKSPACE= 8,
K_TAB= 9,
K_CLEAR= 12,
K_RETURN= 13,
K_PAUSE= 19,
K_ESCAPE= 27,
K_SPACE= 32,
K_EXCLAIM= 33,
K_QUOTEDBL= 34,
K_HASH= 35,
K_DOLLAR= 36,
K_AMPERSAND= 38,
K_QUOTE= 39,
K_LEFTPAREN= 40,
K_RIGHTPAREN= 41,
K_ASTERISK= 42,
K_PLUS= 43,
K_COMMA= 44,
K_MINUS= 45,
K_PERIOD= 46,
K_SLASH= 47,
K_0= 48,
K_1= 49,
K_2= 50,
K_3= 51,
K_4= 52,
K_5= 53,
K_6= 54,
K_7= 55,
K_8= 56,
K_9= 57,
K_COLON= 58,
K_SEMICOLON= 59,
K_LESS= 60,
K_EQUALS= 61,
K_GREATER= 62,
K_QUESTION= 63,
K_AT= 64,
K_LEFTBRACKET= 91,
K_BACKSLASH= 92,
K_RIGHTBRACKET= 93,
K_CARET= 94,
K_UNDERSCORE= 95,
K_BACKQUOTE= 96,
K_a= 97,
K_b= 98,
K_c= 99,
K_d= 100,
K_e= 101,
K_f= 102,
K_g= 103,
K_h= 104,
K_i= 105,
K_j= 106,
K_k= 107,
K_l= 108,
K_m= 109,
K_n= 110,
K_o= 111,
K_p= 112,
K_q= 113,
K_r= 114,
K_s= 115,
K_t= 116,
K_u= 117,
K_v= 118,
K_w= 119,
K_x= 120,
K_y= 121,
K_z= 122,
K_DELETE= 127,
K_WORLD_0= 160,
K_WORLD_1= 161,
K_WORLD_2= 162,
K_WORLD_3= 163,
K_WORLD_4= 164,
K_WORLD_5= 165,
K_WORLD_6= 166,
K_WORLD_7= 167,
K_WORLD_8= 168,
K_WORLD_9= 169,
K_WORLD_10= 170,
K_WORLD_11= 171,
K_WORLD_12= 172,
K_WORLD_13= 173,
K_WORLD_14= 174,
K_WORLD_15= 175,
K_WORLD_16= 176,
K_WORLD_17= 177,
K_WORLD_18= 178,
K_WORLD_19= 179,
K_WORLD_20= 180,
K_WORLD_21= 181,
K_WORLD_22= 182,
K_WORLD_23= 183,
K_WORLD_24= 184,
K_WORLD_25= 185,
K_WORLD_26= 186,
K_WORLD_27= 187,
K_WORLD_28= 188,
K_WORLD_29= 189,
K_WORLD_30= 190,
K_WORLD_31= 191,
K_WORLD_32= 192,
K_WORLD_33= 193,
K_WORLD_34= 194,
K_WORLD_35= 195,
K_WORLD_36= 196,
K_WORLD_37= 197,
K_WORLD_38= 198,
K_WORLD_39= 199,
K_WORLD_40= 200,
K_WORLD_41= 201,
K_WORLD_42= 202,
K_WORLD_43= 203,
K_WORLD_44= 204,
K_WORLD_45= 205,
K_WORLD_46= 206,
K_WORLD_47= 207,
K_WORLD_48= 208,
K_WORLD_49= 209,
K_WORLD_50= 210,
K_WORLD_51= 211,
K_WORLD_52= 212,
K_WORLD_53= 213,
K_WORLD_54= 214,
K_WORLD_55= 215,
K_WORLD_56= 216,
K_WORLD_57= 217,
K_WORLD_58= 218,
K_WORLD_59= 219,
K_WORLD_60= 220,
K_WORLD_61= 221,
K_WORLD_62= 222,
K_WORLD_63= 223,
K_WORLD_64= 224,
K_WORLD_65= 225,
K_WORLD_66= 226,
K_WORLD_67= 227,
K_WORLD_68= 228,
K_WORLD_69= 229,
K_WORLD_70= 230,
K_WORLD_71= 231,
K_WORLD_72= 232,
K_WORLD_73= 233,
K_WORLD_74= 234,
K_WORLD_75= 235,
K_WORLD_76= 236,
K_WORLD_77= 237,
K_WORLD_78= 238,
K_WORLD_79= 239,
K_WORLD_80= 240,
K_WORLD_81= 241,
K_WORLD_82= 242,
K_WORLD_83= 243,
K_WORLD_84= 244,
K_WORLD_85= 245,
K_WORLD_86= 246,
K_WORLD_87= 247,
K_WORLD_88= 248,
K_WORLD_89= 249,
K_WORLD_90= 250,
K_WORLD_91= 251,
K_WORLD_92= 252,
K_WORLD_93= 253,
K_WORLD_94= 254,
K_WORLD_95= 255,
K_KP0= 256,
K_KP1= 257,
K_KP2= 258,
K_KP3= 259,
K_KP4= 260,
K_KP5= 261,
K_KP6= 262,
K_KP7= 263,
K_KP8= 264,
K_KP9= 265,
K_KP_PERIOD= 266,
K_KP_DIVIDE= 267,
K_KP_MULTIPLY= 268,
K_KP_MINUS= 269,
K_KP_PLUS= 270,
K_KP_ENTER= 271,
K_KP_EQUALS= 272,
K_UP= 273,
K_DOWN= 274,
K_RIGHT= 275,
K_LEFT= 276,
K_INSERT= 277,
K_HOME= 278,
K_END= 279,
K_PAGEUP= 280,
K_PAGEDOWN= 281,
K_F1= 282,
K_F2= 283,
K_F3= 284,
K_F4= 285,
K_F5= 286,
K_F6= 287,
K_F7= 288,
K_F8= 289,
K_F9= 290,
K_F10= 291,
K_F11= 292,
K_F12= 293,
K_F13= 294,
K_F14= 295,
K_F15= 296,
K_NUMLOCK= 300,
K_CAPSLOCK= 301,
K_SCROLLOCK= 302,
K_RSHIFT= 303,
K_LSHIFT= 304,
K_RCTRL= 305,
K_LCTRL= 306,
K_RALT= 307,
K_LALT= 308,
K_RMETA= 309,
K_LMETA= 310,
K_LSUPER= 311,
K_RSUPER= 312,
K_MODE= 313,
K_COMPOSE= 314,
K_HELP= 315,
K_PRINT= 316,
K_SYSREQ= 317,
K_BREAK= 318,
K_MENU= 319,
K_POWER= 320,
K_EURO= 321,
K_UNDO= 322,
K_LAST
};

static uint16_t lut[300] = {};
static void init_lut(){
	lut[SDL_SCANCODE_A] = K_a;
	lut[SDL_SCANCODE_B] = K_b;
	lut[SDL_SCANCODE_C] = K_c;
	lut[SDL_SCANCODE_D] = K_d;
	lut[SDL_SCANCODE_E] = K_e;
	lut[SDL_SCANCODE_F] = K_f;
	lut[SDL_SCANCODE_G] = K_g;
	lut[SDL_SCANCODE_H] = K_h;
	lut[SDL_SCANCODE_I] = K_i;
	lut[SDL_SCANCODE_J] = K_j;
	lut[SDL_SCANCODE_K] = K_k;
	lut[SDL_SCANCODE_L] = K_l;
	lut[SDL_SCANCODE_M] = K_m;
	lut[SDL_SCANCODE_N] = K_n;
	lut[SDL_SCANCODE_O] = K_o;
	lut[SDL_SCANCODE_P] = K_p;
	lut[SDL_SCANCODE_Q] = K_q;
	lut[SDL_SCANCODE_S] = K_s;
	lut[SDL_SCANCODE_T] = K_t;
	lut[SDL_SCANCODE_U] = K_u;
	lut[SDL_SCANCODE_V] = K_v;
	lut[SDL_SCANCODE_X] = K_x;
	lut[SDL_SCANCODE_Y] = K_y;
	lut[SDL_SCANCODE_Z] = K_z;
	lut[SDL_SCANCODE_0] = K_0;
	lut[SDL_SCANCODE_1] = K_1;
	lut[SDL_SCANCODE_2] = K_2;
	lut[SDL_SCANCODE_3] = K_3;
	lut[SDL_SCANCODE_4] = K_4;
	lut[SDL_SCANCODE_5] = K_5;
	lut[SDL_SCANCODE_6] = K_6;
	lut[SDL_SCANCODE_7] = K_7;
	lut[SDL_SCANCODE_8] = K_8;
	lut[SDL_SCANCODE_9] = K_9;
	lut[SDL_SCANCODE_RETURN] = K_RETURN;
	lut[SDL_SCANCODE_ESCAPE] = K_ESCAPE;
	lut[SDL_SCANCODE_BACKSPACE] = K_BACKSPACE;
	lut[SDL_SCANCODE_SPACE] = K_SPACE;
	lut[SDL_SCANCODE_TAB] = K_TAB;
	lut[SDL_SCANCODE_MINUS] = K_MINUS;
	lut[SDL_SCANCODE_EQUALS] = K_EQUALS;
	lut[SDL_SCANCODE_LEFTBRACKET] = K_LEFTBRACKET;
	lut[SDL_SCANCODE_RIGHTBRACKET] = K_RIGHTBRACKET;
	lut[SDL_SCANCODE_BACKSLASH] = K_BACKSLASH;
	lut[SDL_SCANCODE_SEMICOLON] = K_SEMICOLON;
	lut[SDL_SCANCODE_COMMA] = K_COMMA;
	lut[SDL_SCANCODE_PERIOD] = K_PERIOD;
	lut[SDL_SCANCODE_SLASH] = K_SLASH;
	lut[SDL_SCANCODE_CAPSLOCK] = K_CAPSLOCK;
	lut[SDL_SCANCODE_F1] = K_F1;
	lut[SDL_SCANCODE_F2] = K_F2;
	lut[SDL_SCANCODE_F3] = K_F3;
	lut[SDL_SCANCODE_F4] = K_F4;
	lut[SDL_SCANCODE_F5] = K_F5;
	lut[SDL_SCANCODE_F6] = K_F6;
	lut[SDL_SCANCODE_F7] = K_F7;
	lut[SDL_SCANCODE_F8] = K_F8;
	lut[SDL_SCANCODE_F9] = K_F9;
	lut[SDL_SCANCODE_F10] = K_F10;
	lut[SDL_SCANCODE_F11] = K_F11;
	lut[SDL_SCANCODE_F8] = K_F8;
	lut[SDL_SCANCODE_F9] = K_F9;
	lut[SDL_SCANCODE_F10] = K_F10;
	lut[SDL_SCANCODE_F11] = K_F11;
	lut[SDL_SCANCODE_F12] = K_F12;
	lut[SDL_SCANCODE_F13] = K_F13;
	lut[SDL_SCANCODE_F14] = K_F14;
	lut[SDL_SCANCODE_F15] = K_F15;
	lut[SDL_SCANCODE_PAUSE] = K_PAUSE;
	lut[SDL_SCANCODE_SCROLLLOCK] = K_SCROLLOCK;
	lut[SDL_SCANCODE_INSERT] = K_INSERT;
	lut[SDL_SCANCODE_HOME] = K_HOME;
	lut[SDL_SCANCODE_PAGEUP] = K_PAGEUP;
	lut[SDL_SCANCODE_PAGEDOWN] = K_PAGEDOWN;
	lut[SDL_SCANCODE_DELETE] = K_DELETE;
	lut[SDL_SCANCODE_END] = K_END;
	lut[SDL_SCANCODE_LEFT] = K_LEFT;
	lut[SDL_SCANCODE_RIGHT] = K_RIGHT;
	lut[SDL_SCANCODE_UP] = K_UP;
	lut[SDL_SCANCODE_DOWN] = K_DOWN;
	lut[SDL_SCANCODE_NUMLOCKCLEAR] = K_NUMLOCK;
	lut[SDL_SCANCODE_KP_0] = K_KP0;
	lut[SDL_SCANCODE_KP_1] = K_KP1;
	lut[SDL_SCANCODE_KP_2] = K_KP2;
	lut[SDL_SCANCODE_KP_3] = K_KP3;
	lut[SDL_SCANCODE_KP_4] = K_KP4;
	lut[SDL_SCANCODE_KP_5] = K_KP5;
	lut[SDL_SCANCODE_KP_6] = K_KP6;
	lut[SDL_SCANCODE_KP_7] = K_KP7;
	lut[SDL_SCANCODE_KP_8] = K_KP8;
	lut[SDL_SCANCODE_KP_9] = K_KP9;
	lut[SDL_SCANCODE_KP_DIVIDE] = K_KP_DIVIDE;
	lut[SDL_SCANCODE_KP_MULTIPLY] = K_KP_MULTIPLY;
	lut[SDL_SCANCODE_KP_MINUS] = K_KP_MINUS;
	lut[SDL_SCANCODE_KP_PLUS] = K_KP_PLUS;
	lut[SDL_SCANCODE_KP_ENTER] = K_KP_ENTER;
	lut[SDL_SCANCODE_KP_PERIOD] = K_KP_PERIOD;
	lut[SDL_SCANCODE_KP_EQUALS] = K_KP_EQUALS;
	lut[SDL_SCANCODE_POWER] = K_POWER;
	lut[SDL_SCANCODE_HELP] = K_HELP;
	lut[SDL_SCANCODE_MENU] = K_MENU;
	lut[SDL_SCANCODE_SYSREQ] = K_SYSREQ;
	lut[SDL_SCANCODE_CLEAR] = K_CLEAR;
	lut[SDL_SCANCODE_LCTRL] = K_LCTRL;
	lut[SDL_SCANCODE_LSHIFT] = K_LSHIFT;
	lut[SDL_SCANCODE_LALT] = K_LALT;
	lut[SDL_SCANCODE_RCTRL] = K_RCTRL;
	lut[SDL_SCANCODE_RSHIFT] = K_RSHIFT;
	lut[SDL_SCANCODE_RALT] = K_RALT;
	lut[SDL_SCANCODE_MODE] = K_MODE;
	lut[SDL_SCANCODE_UNDO] = K_UNDO;
/* SDL_SCANCODE_PRINTSCREEN  */
/* SDL_SCANCODE_NONUSHASH  */
/* SDL_SCANCODE_APOSTROPHE  */
/* SDL_SCANCODE_GRAVE  */
/* SDL_SCANCODE_F16  */
/* SDL_SCANCODE_F17  */
/* SDL_SCANCODE_F18  */
/* SDL_SCANCODE_F19  */
/* SDL_SCANCODE_F20  */
/* SDL_SCANCODE_F21  */
/* SDL_SCANCODE_F22  */
/* SDL_SCANCODE_F23  */
/* SDL_SCANCODE_F24  */
/* SDL_SCANCODE_EXECUTE  */
/* SDL_SCANCODE_NONUSBACKSLASH  */
/* SDL_SCANCODE_APPLICATION  */
/* SDL_SCANCODE_SELECT  */
/* SDL_SCANCODE_STOP  */
/* SDL_SCANCODE_AGAIN  */
/* SDL_SCANCODE_CUT */
/* SDL_SCANCODE_COPY  */
/* SDL_SCANCODE_PASTE  */
/* SDL_SCANCODE_FIND  */
/* SDL_SCANCODE_MUTE  */
/* SDL_SCANCODE_VOLUMEUP  */
/* SDL_SCANCODE_VOLUMEDOWN  */
/* SDL_SCANCODE_KP_COMMA  */
/* SDL_SCANCODE_KP_EQUALSAS400  */
/* SDL_SCANCODE_INTERNATIONAL1  */
/* SDL_SCANCODE_INTERNATIONAL2  */
/* SDL_SCANCODE_INTERNATIONAL3  */
/* SDL_SCANCODE_INTERNATIONAL4  */
/* SDL_SCANCODE_INTERNATIONAL5  */
/* SDL_SCANCODE_INTERNATIONAL6  */
/* SDL_SCANCODE_INTERNATIONAL7  */
/* SDL_SCANCODE_INTERNATIONAL8  */
/* SDL_SCANCODE_INTERNATIONAL9  */
/* SDL_SCANCODE_LANG1  */
/* SDL_SCANCODE_LANG2  */
/* SDL_SCANCODE_LANG3  */
/* SDL_SCANCODE_LANG4  */
/* SDL_SCANCODE_LANG5  */
/* SDL_SCANCODE_LANG6  */
/* SDL_SCANCODE_LANG7  */
/* SDL_SCANCODE_LANG8  */
/* SDL_SCANCODE_LANG9  */
/* SDL_SCANCODE_ALTERASE  */
/* SDL_SCANCODE_CANCEL  */
/* SDL_SCANCODE_PRIOR  */
/* SDL_SCANCODE_RETURN2  */
/* SDL_SCANCODE_SEPARATOR  */
/* SDL_SCANCODE_OUT  */
/* SDL_SCANCODE_OPER  */
/* SDL_SCANCODE_CLEARAGAIN  */
/* SDL_SCANCODE_CRSEL  */
/* SDL_SCANCODE_EXSEL  */
/* SDL_SCANCODE_KP_00  */
/* SDL_SCANCODE_KP_000  */
/* SDL_SCANCODE_THOUSANDSSEPARATOR  */
/* SDL_SCANCODE_DECIMALSEPARATOR  */
/* SDL_SCANCODE_CURRENCYUNIT  */
/* SDL_SCANCODE_CURRENCYSUBUNIT  */
/* SDL_SCANCODE_KP_LEFTPAREN  */
/* SDL_SCANCODE_KP_RIGHTPAREN  */
/* SDL_SCANCODE_KP_LEFTBRACE  */
/* SDL_SCANCODE_KP_RIGHTBRACE  */
/* SDL_SCANCODE_KP_TAB  */
/* SDL_SCANCODE_KP_BACKSPACE  */
/* SDL_SCANCODE_KP_A  */
/* SDL_SCANCODE_KP_B  */
/* SDL_SCANCODE_KP_C  */
/* SDL_SCANCODE_KP_D  */
/* SDL_SCANCODE_KP_E  */
/* SDL_SCANCODE_KP_F  */
/* SDL_SCANCODE_KP_XOR  */
/* SDL_SCANCODE_KP_POWER  */
/* SDL_SCANCODE_KP_PERCENT  */
/* SDL_SCANCODE_KP_LESS  */
/* SDL_SCANCODE_KP_GREATER  */
/* SDL_SCANCODE_KP_AMPERSAND  */
/* SDL_SCANCODE_KP_DBLAMPERSAND  */
/* SDL_SCANCODE_KP_VERTICALBAR  */
/* SDL_SCANCODE_KP_DBLVERTICALBAR  */
/* SDL_SCANCODE_KP_COLON  */
/* SDL_SCANCODE_KP_HASH  */
/* SDL_SCANCODE_KP_SPACE  */
/* SDL_SCANCODE_KP_AT  */
/* SDL_SCANCODE_KP_EXCLAM  */
/* SDL_SCANCODE_KP_MEMSTORE  */
/* SDL_SCANCODE_KP_MEMRECALL  */
/* SDL_SCANCODE_KP_MEMCLEAR  */
/* SDL_SCANCODE_KP_MEMADD  */
/* SDL_SCANCODE_KP_MEMSUBTRACT  */
/* SDL_SCANCODE_KP_MEMMULTIPLY  */
/* SDL_SCANCODE_KP_MEMDIVIDE  */
/* SDL_SCANCODE_KP_PLUSMINUS  */
/* SDL_SCANCODE_KP_CLEAR  */
/* SDL_SCANCODE_KP_CLEARENTRY  */
/* SDL_SCANCODE_KP_BINARY  */
/* SDL_SCANCODE_KP_OCTAL  */
/* SDL_SCANCODE_KP_DECIMAL  */
/* SDL_SCANCODE_KP_HEXADECIMAL  */
/* SDL_SCANCODE_LGUI  */
/* SDL_SCANCODE_RGUI  */
/* SDL_SCANCODE_AUDIONEXT  */
/* SDL_SCANCODE_AUDIOPREV  */
/* SDL_SCANCODE_AUDIOSTOP  */
/* SDL_SCANCODE_AUDIOPLAY  */
/* SDL_SCANCODE_AUDIOMUTE  */
/* SDL_SCANCODE_MEDIASELECT  */
/* SDL_SCANCODE_WWW  */
/* SDL_SCANCODE_MAIL  */
/* SDL_SCANCODE_CALCULATOR  */
/* SDL_SCANCODE_COMPUTER  */
/* SDL_SCANCODE_AC_SEARCH  */
/* SDL_SCANCODE_AC_HOME  */
/* SDL_SCANCODE_AC_BACK  */
/* SDL_SCANCODE_AC_FORWARD  */
/* SDL_SCANCODE_AC_STOP  */
/* SDL_SCANCODE_AC_REFRESH  */
/* SDL_SCANCODE_AC_BOOKMARKS  */
/* SDL_SCANCODE_BRIGHTNESSDOWN  */
/* SDL_SCANCODE_BRIGHTNESSUP  */
/* SDL_SCANCODE_DISPLAYSWITCH  */
/* SDL_SCANCODE_KBDILLUMTOGGLE  */
/* SDL_SCANCODE_KBDILLUMDOWN  */
/* SDL_SCANCODE_KBDILLUMUP  */
/* SDL_SCANCODE_EJECT  */
/* SDL_SCANCODE_SLEEP  */
/* SDL_SCANCODE_APP1  */
/* SDL_SCANCODE_APP2  */
}
