LuaYard/LuaEnum.cpp
2019-08-18 02:01:00 +08:00

508 lines
16 KiB
C++

#include "LuaEnum.h"
#include "SDL2/include/SDL.h"
#include "SDL2/include/SDL_mixer.h"
#include "SDL2/include/SDL_ttf.h"
#include "SDL2/include/SDL_image.h"
using namespace std;
#define addkey(key, name) lua_pushinteger(L, key);lua_setfield(L, -2, name)
/*
Key code generated with Python script:
```python
lst = filter(lambda x: True if x else False, content.replace('\r', '').split('\n'))
x = set()
for line in lst:
keyname = line.split('=')[0].strip()
Lkeyname = keyname.replace('SDLK_', '').lower()
Gkeyname = keyname.replace('SDLK_', '').upper()
if Lkeyname not in x:
print "addkey({}, \"{}\");".format(keyname, Lkeyname)
x.add(Lkeyname)
if Gkeyname not in x:
print "addkey({}, \"{}\");".format(keyname, Gkeyname)
x.add(Gkeyname)
```
*/
int InitEnum(lua_State* L)
{
lua_newtable(L);
addkey(SDLK_UNKNOWN, "unknown");
addkey(SDLK_UNKNOWN, "UNKNOWN");
addkey(SDLK_RETURN, "return");
addkey(SDLK_RETURN, "RETURN");
addkey(SDLK_ESCAPE, "escape");
addkey(SDLK_ESCAPE, "ESCAPE");
addkey(SDLK_BACKSPACE, "backspace");
addkey(SDLK_BACKSPACE, "BACKSPACE");
addkey(SDLK_TAB, "tab");
addkey(SDLK_TAB, "TAB");
addkey(SDLK_SPACE, "space");
addkey(SDLK_SPACE, "SPACE");
addkey(SDLK_EXCLAIM, "exclaim");
addkey(SDLK_EXCLAIM, "EXCLAIM");
addkey(SDLK_QUOTEDBL, "quotedbl");
addkey(SDLK_QUOTEDBL, "QUOTEDBL");
addkey(SDLK_HASH, "hash");
addkey(SDLK_HASH, "HASH");
addkey(SDLK_PERCENT, "percent");
addkey(SDLK_PERCENT, "PERCENT");
addkey(SDLK_DOLLAR, "dollar");
addkey(SDLK_DOLLAR, "DOLLAR");
addkey(SDLK_AMPERSAND, "ampersand");
addkey(SDLK_AMPERSAND, "AMPERSAND");
addkey(SDLK_QUOTE, "quote");
addkey(SDLK_QUOTE, "QUOTE");
addkey(SDLK_LEFTPAREN, "leftparen");
addkey(SDLK_LEFTPAREN, "LEFTPAREN");
addkey(SDLK_RIGHTPAREN, "rightparen");
addkey(SDLK_RIGHTPAREN, "RIGHTPAREN");
addkey(SDLK_ASTERISK, "asterisk");
addkey(SDLK_ASTERISK, "ASTERISK");
addkey(SDLK_PLUS, "plus");
addkey(SDLK_PLUS, "PLUS");
addkey(SDLK_COMMA, "comma");
addkey(SDLK_COMMA, "COMMA");
addkey(SDLK_MINUS, "minus");
addkey(SDLK_MINUS, "MINUS");
addkey(SDLK_PERIOD, "period");
addkey(SDLK_PERIOD, "PERIOD");
addkey(SDLK_SLASH, "slash");
addkey(SDLK_SLASH, "SLASH");
addkey(SDLK_0, "0");
addkey(SDLK_1, "1");
addkey(SDLK_2, "2");
addkey(SDLK_3, "3");
addkey(SDLK_4, "4");
addkey(SDLK_5, "5");
addkey(SDLK_6, "6");
addkey(SDLK_7, "7");
addkey(SDLK_8, "8");
addkey(SDLK_9, "9");
addkey(SDLK_COLON, "colon");
addkey(SDLK_COLON, "COLON");
addkey(SDLK_SEMICOLON, "semicolon");
addkey(SDLK_SEMICOLON, "SEMICOLON");
addkey(SDLK_LESS, "less");
addkey(SDLK_LESS, "LESS");
addkey(SDLK_EQUALS, "equals");
addkey(SDLK_EQUALS, "EQUALS");
addkey(SDLK_GREATER, "greater");
addkey(SDLK_GREATER, "GREATER");
addkey(SDLK_QUESTION, "question");
addkey(SDLK_QUESTION, "QUESTION");
addkey(SDLK_AT, "at");
addkey(SDLK_AT, "AT");
addkey(SDLK_LEFTBRACKET, "leftbracket");
addkey(SDLK_LEFTBRACKET, "LEFTBRACKET");
addkey(SDLK_BACKSLASH, "backslash");
addkey(SDLK_BACKSLASH, "BACKSLASH");
addkey(SDLK_RIGHTBRACKET, "rightbracket");
addkey(SDLK_RIGHTBRACKET, "RIGHTBRACKET");
addkey(SDLK_CARET, "caret");
addkey(SDLK_CARET, "CARET");
addkey(SDLK_UNDERSCORE, "underscore");
addkey(SDLK_UNDERSCORE, "UNDERSCORE");
addkey(SDLK_BACKQUOTE, "backquote");
addkey(SDLK_BACKQUOTE, "BACKQUOTE");
addkey(SDLK_a, "a");
addkey(SDLK_a, "A");
addkey(SDLK_b, "b");
addkey(SDLK_b, "B");
addkey(SDLK_c, "c");
addkey(SDLK_c, "C");
addkey(SDLK_d, "d");
addkey(SDLK_d, "D");
addkey(SDLK_e, "e");
addkey(SDLK_e, "E");
addkey(SDLK_f, "f");
addkey(SDLK_f, "F");
addkey(SDLK_g, "g");
addkey(SDLK_g, "G");
addkey(SDLK_h, "h");
addkey(SDLK_h, "H");
addkey(SDLK_i, "i");
addkey(SDLK_i, "I");
addkey(SDLK_j, "j");
addkey(SDLK_j, "J");
addkey(SDLK_k, "k");
addkey(SDLK_k, "K");
addkey(SDLK_l, "l");
addkey(SDLK_l, "L");
addkey(SDLK_m, "m");
addkey(SDLK_m, "M");
addkey(SDLK_n, "n");
addkey(SDLK_n, "N");
addkey(SDLK_o, "o");
addkey(SDLK_o, "O");
addkey(SDLK_p, "p");
addkey(SDLK_p, "P");
addkey(SDLK_q, "q");
addkey(SDLK_q, "Q");
addkey(SDLK_r, "r");
addkey(SDLK_r, "R");
addkey(SDLK_s, "s");
addkey(SDLK_s, "S");
addkey(SDLK_t, "t");
addkey(SDLK_t, "T");
addkey(SDLK_u, "u");
addkey(SDLK_u, "U");
addkey(SDLK_v, "v");
addkey(SDLK_v, "V");
addkey(SDLK_w, "w");
addkey(SDLK_w, "W");
addkey(SDLK_x, "x");
addkey(SDLK_x, "X");
addkey(SDLK_y, "y");
addkey(SDLK_y, "Y");
addkey(SDLK_z, "z");
addkey(SDLK_z, "Z");
addkey(SDLK_CAPSLOCK, "capslock");
addkey(SDLK_CAPSLOCK, "CAPSLOCK");
addkey(SDLK_F1, "f1");
addkey(SDLK_F1, "F1");
addkey(SDLK_F2, "f2");
addkey(SDLK_F2, "F2");
addkey(SDLK_F3, "f3");
addkey(SDLK_F3, "F3");
addkey(SDLK_F4, "f4");
addkey(SDLK_F4, "F4");
addkey(SDLK_F5, "f5");
addkey(SDLK_F5, "F5");
addkey(SDLK_F6, "f6");
addkey(SDLK_F6, "F6");
addkey(SDLK_F7, "f7");
addkey(SDLK_F7, "F7");
addkey(SDLK_F8, "f8");
addkey(SDLK_F8, "F8");
addkey(SDLK_F9, "f9");
addkey(SDLK_F9, "F9");
addkey(SDLK_F10, "f10");
addkey(SDLK_F10, "F10");
addkey(SDLK_F11, "f11");
addkey(SDLK_F11, "F11");
addkey(SDLK_F12, "f12");
addkey(SDLK_F12, "F12");
addkey(SDLK_PRINTSCREEN, "printscreen");
addkey(SDLK_PRINTSCREEN, "PRINTSCREEN");
addkey(SDLK_SCROLLLOCK, "scrolllock");
addkey(SDLK_SCROLLLOCK, "SCROLLLOCK");
addkey(SDLK_PAUSE, "pause");
addkey(SDLK_PAUSE, "PAUSE");
addkey(SDLK_INSERT, "insert");
addkey(SDLK_INSERT, "INSERT");
addkey(SDLK_HOME, "home");
addkey(SDLK_HOME, "HOME");
addkey(SDLK_PAGEUP, "pageup");
addkey(SDLK_PAGEUP, "PAGEUP");
addkey(SDLK_DELETE, "delete");
addkey(SDLK_DELETE, "DELETE");
addkey(SDLK_END, "end");
addkey(SDLK_END, "END");
addkey(SDLK_PAGEDOWN, "pagedown");
addkey(SDLK_PAGEDOWN, "PAGEDOWN");
addkey(SDLK_RIGHT, "right");
addkey(SDLK_RIGHT, "RIGHT");
addkey(SDLK_LEFT, "left");
addkey(SDLK_LEFT, "LEFT");
addkey(SDLK_DOWN, "down");
addkey(SDLK_DOWN, "DOWN");
addkey(SDLK_UP, "up");
addkey(SDLK_UP, "UP");
addkey(SDLK_NUMLOCKCLEAR, "numlockclear");
addkey(SDLK_NUMLOCKCLEAR, "NUMLOCKCLEAR");
addkey(SDLK_KP_DIVIDE, "kp_divide");
addkey(SDLK_KP_DIVIDE, "KP_DIVIDE");
addkey(SDLK_KP_MULTIPLY, "kp_multiply");
addkey(SDLK_KP_MULTIPLY, "KP_MULTIPLY");
addkey(SDLK_KP_MINUS, "kp_minus");
addkey(SDLK_KP_MINUS, "KP_MINUS");
addkey(SDLK_KP_PLUS, "kp_plus");
addkey(SDLK_KP_PLUS, "KP_PLUS");
addkey(SDLK_KP_ENTER, "kp_enter");
addkey(SDLK_KP_ENTER, "KP_ENTER");
addkey(SDLK_KP_1, "kp_1");
addkey(SDLK_KP_1, "KP_1");
addkey(SDLK_KP_2, "kp_2");
addkey(SDLK_KP_2, "KP_2");
addkey(SDLK_KP_3, "kp_3");
addkey(SDLK_KP_3, "KP_3");
addkey(SDLK_KP_4, "kp_4");
addkey(SDLK_KP_4, "KP_4");
addkey(SDLK_KP_5, "kp_5");
addkey(SDLK_KP_5, "KP_5");
addkey(SDLK_KP_6, "kp_6");
addkey(SDLK_KP_6, "KP_6");
addkey(SDLK_KP_7, "kp_7");
addkey(SDLK_KP_7, "KP_7");
addkey(SDLK_KP_8, "kp_8");
addkey(SDLK_KP_8, "KP_8");
addkey(SDLK_KP_9, "kp_9");
addkey(SDLK_KP_9, "KP_9");
addkey(SDLK_KP_0, "kp_0");
addkey(SDLK_KP_0, "KP_0");
addkey(SDLK_KP_PERIOD, "kp_period");
addkey(SDLK_KP_PERIOD, "KP_PERIOD");
addkey(SDLK_APPLICATION, "application");
addkey(SDLK_APPLICATION, "APPLICATION");
addkey(SDLK_POWER, "power");
addkey(SDLK_POWER, "POWER");
addkey(SDLK_KP_EQUALS, "kp_equals");
addkey(SDLK_KP_EQUALS, "KP_EQUALS");
addkey(SDLK_F13, "f13");
addkey(SDLK_F13, "F13");
addkey(SDLK_F14, "f14");
addkey(SDLK_F14, "F14");
addkey(SDLK_F15, "f15");
addkey(SDLK_F15, "F15");
addkey(SDLK_F16, "f16");
addkey(SDLK_F16, "F16");
addkey(SDLK_F17, "f17");
addkey(SDLK_F17, "F17");
addkey(SDLK_F18, "f18");
addkey(SDLK_F18, "F18");
addkey(SDLK_F19, "f19");
addkey(SDLK_F19, "F19");
addkey(SDLK_F20, "f20");
addkey(SDLK_F20, "F20");
addkey(SDLK_F21, "f21");
addkey(SDLK_F21, "F21");
addkey(SDLK_F22, "f22");
addkey(SDLK_F22, "F22");
addkey(SDLK_F23, "f23");
addkey(SDLK_F23, "F23");
addkey(SDLK_F24, "f24");
addkey(SDLK_F24, "F24");
addkey(SDLK_EXECUTE, "execute");
addkey(SDLK_EXECUTE, "EXECUTE");
addkey(SDLK_HELP, "help");
addkey(SDLK_HELP, "HELP");
addkey(SDLK_MENU, "menu");
addkey(SDLK_MENU, "MENU");
addkey(SDLK_SELECT, "select");
addkey(SDLK_SELECT, "SELECT");
addkey(SDLK_STOP, "stop");
addkey(SDLK_STOP, "STOP");
addkey(SDLK_AGAIN, "again");
addkey(SDLK_AGAIN, "AGAIN");
addkey(SDLK_UNDO, "undo");
addkey(SDLK_UNDO, "UNDO");
addkey(SDLK_CUT, "cut");
addkey(SDLK_CUT, "CUT");
addkey(SDLK_COPY, "copy");
addkey(SDLK_COPY, "COPY");
addkey(SDLK_PASTE, "paste");
addkey(SDLK_PASTE, "PASTE");
addkey(SDLK_FIND, "find");
addkey(SDLK_FIND, "FIND");
addkey(SDLK_MUTE, "mute");
addkey(SDLK_MUTE, "MUTE");
addkey(SDLK_VOLUMEUP, "volumeup");
addkey(SDLK_VOLUMEUP, "VOLUMEUP");
addkey(SDLK_VOLUMEDOWN, "volumedown");
addkey(SDLK_VOLUMEDOWN, "VOLUMEDOWN");
addkey(SDLK_KP_COMMA, "kp_comma");
addkey(SDLK_KP_COMMA, "KP_COMMA");
addkey(SDLK_KP_EQUALSAS400, "kp_equalsas400");
addkey(SDLK_KP_EQUALSAS400, "KP_EQUALSAS400");
addkey(SDLK_ALTERASE, "alterase");
addkey(SDLK_ALTERASE, "ALTERASE");
addkey(SDLK_SYSREQ, "sysreq");
addkey(SDLK_SYSREQ, "SYSREQ");
addkey(SDLK_CANCEL, "cancel");
addkey(SDLK_CANCEL, "CANCEL");
addkey(SDLK_CLEAR, "clear");
addkey(SDLK_CLEAR, "CLEAR");
addkey(SDLK_PRIOR, "prior");
addkey(SDLK_PRIOR, "PRIOR");
addkey(SDLK_RETURN2, "return2");
addkey(SDLK_RETURN2, "RETURN2");
addkey(SDLK_SEPARATOR, "separator");
addkey(SDLK_SEPARATOR, "SEPARATOR");
addkey(SDLK_OUT, "out");
addkey(SDLK_OUT, "OUT");
addkey(SDLK_OPER, "oper");
addkey(SDLK_OPER, "OPER");
addkey(SDLK_CLEARAGAIN, "clearagain");
addkey(SDLK_CLEARAGAIN, "CLEARAGAIN");
addkey(SDLK_CRSEL, "crsel");
addkey(SDLK_CRSEL, "CRSEL");
addkey(SDLK_EXSEL, "exsel");
addkey(SDLK_EXSEL, "EXSEL");
addkey(SDLK_KP_00, "kp_00");
addkey(SDLK_KP_00, "KP_00");
addkey(SDLK_KP_000, "kp_000");
addkey(SDLK_KP_000, "KP_000");
addkey(SDLK_THOUSANDSSEPARATOR, "thousandsseparator");
addkey(SDLK_THOUSANDSSEPARATOR, "THOUSANDSSEPARATOR");
addkey(SDLK_DECIMALSEPARATOR, "decimalseparator");
addkey(SDLK_DECIMALSEPARATOR, "DECIMALSEPARATOR");
addkey(SDLK_CURRENCYUNIT, "currencyunit");
addkey(SDLK_CURRENCYUNIT, "CURRENCYUNIT");
addkey(SDLK_CURRENCYSUBUNIT, "currencysubunit");
addkey(SDLK_CURRENCYSUBUNIT, "CURRENCYSUBUNIT");
addkey(SDLK_KP_LEFTPAREN, "kp_leftparen");
addkey(SDLK_KP_LEFTPAREN, "KP_LEFTPAREN");
addkey(SDLK_KP_RIGHTPAREN, "kp_rightparen");
addkey(SDLK_KP_RIGHTPAREN, "KP_RIGHTPAREN");
addkey(SDLK_KP_LEFTBRACE, "kp_leftbrace");
addkey(SDLK_KP_LEFTBRACE, "KP_LEFTBRACE");
addkey(SDLK_KP_RIGHTBRACE, "kp_rightbrace");
addkey(SDLK_KP_RIGHTBRACE, "KP_RIGHTBRACE");
addkey(SDLK_KP_TAB, "kp_tab");
addkey(SDLK_KP_TAB, "KP_TAB");
addkey(SDLK_KP_BACKSPACE, "kp_backspace");
addkey(SDLK_KP_BACKSPACE, "KP_BACKSPACE");
addkey(SDLK_KP_A, "kp_a");
addkey(SDLK_KP_A, "KP_A");
addkey(SDLK_KP_B, "kp_b");
addkey(SDLK_KP_B, "KP_B");
addkey(SDLK_KP_C, "kp_c");
addkey(SDLK_KP_C, "KP_C");
addkey(SDLK_KP_D, "kp_d");
addkey(SDLK_KP_D, "KP_D");
addkey(SDLK_KP_E, "kp_e");
addkey(SDLK_KP_E, "KP_E");
addkey(SDLK_KP_F, "kp_f");
addkey(SDLK_KP_F, "KP_F");
addkey(SDLK_KP_XOR, "kp_xor");
addkey(SDLK_KP_XOR, "KP_XOR");
addkey(SDLK_KP_POWER, "kp_power");
addkey(SDLK_KP_POWER, "KP_POWER");
addkey(SDLK_KP_PERCENT, "kp_percent");
addkey(SDLK_KP_PERCENT, "KP_PERCENT");
addkey(SDLK_KP_LESS, "kp_less");
addkey(SDLK_KP_LESS, "KP_LESS");
addkey(SDLK_KP_GREATER, "kp_greater");
addkey(SDLK_KP_GREATER, "KP_GREATER");
addkey(SDLK_KP_AMPERSAND, "kp_ampersand");
addkey(SDLK_KP_AMPERSAND, "KP_AMPERSAND");
addkey(SDLK_KP_DBLAMPERSAND, "kp_dblampersand");
addkey(SDLK_KP_DBLAMPERSAND, "KP_DBLAMPERSAND");
addkey(SDLK_KP_VERTICALBAR, "kp_verticalbar");
addkey(SDLK_KP_VERTICALBAR, "KP_VERTICALBAR");
addkey(SDLK_KP_DBLVERTICALBAR, "kp_dblverticalbar");
addkey(SDLK_KP_DBLVERTICALBAR, "KP_DBLVERTICALBAR");
addkey(SDLK_KP_COLON, "kp_colon");
addkey(SDLK_KP_COLON, "KP_COLON");
addkey(SDLK_KP_HASH, "kp_hash");
addkey(SDLK_KP_HASH, "KP_HASH");
addkey(SDLK_KP_SPACE, "kp_space");
addkey(SDLK_KP_SPACE, "KP_SPACE");
addkey(SDLK_KP_AT, "kp_at");
addkey(SDLK_KP_AT, "KP_AT");
addkey(SDLK_KP_EXCLAM, "kp_exclam");
addkey(SDLK_KP_EXCLAM, "KP_EXCLAM");
addkey(SDLK_KP_MEMSTORE, "kp_memstore");
addkey(SDLK_KP_MEMSTORE, "KP_MEMSTORE");
addkey(SDLK_KP_MEMRECALL, "kp_memrecall");
addkey(SDLK_KP_MEMRECALL, "KP_MEMRECALL");
addkey(SDLK_KP_MEMCLEAR, "kp_memclear");
addkey(SDLK_KP_MEMCLEAR, "KP_MEMCLEAR");
addkey(SDLK_KP_MEMADD, "kp_memadd");
addkey(SDLK_KP_MEMADD, "KP_MEMADD");
addkey(SDLK_KP_MEMSUBTRACT, "kp_memsubtract");
addkey(SDLK_KP_MEMSUBTRACT, "KP_MEMSUBTRACT");
addkey(SDLK_KP_MEMMULTIPLY, "kp_memmultiply");
addkey(SDLK_KP_MEMMULTIPLY, "KP_MEMMULTIPLY");
addkey(SDLK_KP_MEMDIVIDE, "kp_memdivide");
addkey(SDLK_KP_MEMDIVIDE, "KP_MEMDIVIDE");
addkey(SDLK_KP_PLUSMINUS, "kp_plusminus");
addkey(SDLK_KP_PLUSMINUS, "KP_PLUSMINUS");
addkey(SDLK_KP_CLEAR, "kp_clear");
addkey(SDLK_KP_CLEAR, "KP_CLEAR");
addkey(SDLK_KP_CLEARENTRY, "kp_clearentry");
addkey(SDLK_KP_CLEARENTRY, "KP_CLEARENTRY");
addkey(SDLK_KP_BINARY, "kp_binary");
addkey(SDLK_KP_BINARY, "KP_BINARY");
addkey(SDLK_KP_OCTAL, "kp_octal");
addkey(SDLK_KP_OCTAL, "KP_OCTAL");
addkey(SDLK_KP_DECIMAL, "kp_decimal");
addkey(SDLK_KP_DECIMAL, "KP_DECIMAL");
addkey(SDLK_KP_HEXADECIMAL, "kp_hexadecimal");
addkey(SDLK_KP_HEXADECIMAL, "KP_HEXADECIMAL");
addkey(SDLK_LCTRL, "lctrl");
addkey(SDLK_LCTRL, "LCTRL");
addkey(SDLK_LSHIFT, "lshift");
addkey(SDLK_LSHIFT, "LSHIFT");
addkey(SDLK_LALT, "lalt");
addkey(SDLK_LALT, "LALT");
addkey(SDLK_LGUI, "lgui");
addkey(SDLK_LGUI, "LGUI");
addkey(SDLK_RCTRL, "rctrl");
addkey(SDLK_RCTRL, "RCTRL");
addkey(SDLK_RSHIFT, "rshift");
addkey(SDLK_RSHIFT, "RSHIFT");
addkey(SDLK_RALT, "ralt");
addkey(SDLK_RALT, "RALT");
addkey(SDLK_RGUI, "rgui");
addkey(SDLK_RGUI, "RGUI");
addkey(SDLK_MODE, "mode");
addkey(SDLK_MODE, "MODE");
addkey(SDLK_AUDIONEXT, "audionext");
addkey(SDLK_AUDIONEXT, "AUDIONEXT");
addkey(SDLK_AUDIOPREV, "audioprev");
addkey(SDLK_AUDIOPREV, "AUDIOPREV");
addkey(SDLK_AUDIOSTOP, "audiostop");
addkey(SDLK_AUDIOSTOP, "AUDIOSTOP");
addkey(SDLK_AUDIOPLAY, "audioplay");
addkey(SDLK_AUDIOPLAY, "AUDIOPLAY");
addkey(SDLK_AUDIOMUTE, "audiomute");
addkey(SDLK_AUDIOMUTE, "AUDIOMUTE");
addkey(SDLK_MEDIASELECT, "mediaselect");
addkey(SDLK_MEDIASELECT, "MEDIASELECT");
addkey(SDLK_WWW, "www");
addkey(SDLK_WWW, "WWW");
addkey(SDLK_MAIL, "mail");
addkey(SDLK_MAIL, "MAIL");
addkey(SDLK_CALCULATOR, "calculator");
addkey(SDLK_CALCULATOR, "CALCULATOR");
addkey(SDLK_COMPUTER, "computer");
addkey(SDLK_COMPUTER, "COMPUTER");
addkey(SDLK_AC_SEARCH, "ac_search");
addkey(SDLK_AC_SEARCH, "AC_SEARCH");
addkey(SDLK_AC_HOME, "ac_home");
addkey(SDLK_AC_HOME, "AC_HOME");
addkey(SDLK_AC_BACK, "ac_back");
addkey(SDLK_AC_BACK, "AC_BACK");
addkey(SDLK_AC_FORWARD, "ac_forward");
addkey(SDLK_AC_FORWARD, "AC_FORWARD");
addkey(SDLK_AC_STOP, "ac_stop");
addkey(SDLK_AC_STOP, "AC_STOP");
addkey(SDLK_AC_REFRESH, "ac_refresh");
addkey(SDLK_AC_REFRESH, "AC_REFRESH");
addkey(SDLK_AC_BOOKMARKS, "ac_bookmarks");
addkey(SDLK_AC_BOOKMARKS, "AC_BOOKMARKS");
addkey(SDLK_BRIGHTNESSDOWN, "brightnessdown");
addkey(SDLK_BRIGHTNESSDOWN, "BRIGHTNESSDOWN");
addkey(SDLK_BRIGHTNESSUP, "brightnessup");
addkey(SDLK_BRIGHTNESSUP, "BRIGHTNESSUP");
addkey(SDLK_DISPLAYSWITCH, "displayswitch");
addkey(SDLK_DISPLAYSWITCH, "DISPLAYSWITCH");
addkey(SDLK_KBDILLUMTOGGLE, "kbdillumtoggle");
addkey(SDLK_KBDILLUMTOGGLE, "KBDILLUMTOGGLE");
addkey(SDLK_KBDILLUMDOWN, "kbdillumdown");
addkey(SDLK_KBDILLUMDOWN, "KBDILLUMDOWN");
addkey(SDLK_KBDILLUMUP, "kbdillumup");
addkey(SDLK_KBDILLUMUP, "KBDILLUMUP");
addkey(SDLK_EJECT, "eject");
addkey(SDLK_EJECT, "EJECT");
addkey(SDLK_SLEEP, "sleep");
addkey(SDLK_SLEEP, "SLEEP");
addkey(SDLK_APP1, "app1");
addkey(SDLK_APP1, "APP1");
addkey(SDLK_APP2, "app2");
addkey(SDLK_APP2, "APP2");
addkey(SDLK_AUDIOREWIND, "audiorewind");
addkey(SDLK_AUDIOREWIND, "AUDIOREWIND");
addkey(SDLK_AUDIOFASTFORWARD, "audiofastforward");
addkey(SDLK_AUDIOFASTFORWARD, "AUDIOFASTFORWARD");
lua_setglobal(L, "Keys");
return 0;
}