diff --git a/scripts/gen_keys.py b/scripts/gen_keys.py index 44a3b063f..0d8c7a84c 100644 --- a/scripts/gen_keys.py +++ b/scripts/gen_keys.py @@ -44,9 +44,11 @@ print >>f, "\tKEY_MOUSE_5 = %d,"%(highestid+5); keynames[highestid+5] = "mouse5" print >>f, "\tKEY_MOUSE_6 = %d,"%(highestid+6); keynames[highestid+6] = "mouse6" print >>f, "\tKEY_MOUSE_7 = %d,"%(highestid+7); keynames[highestid+7] = "mouse7" print >>f, "\tKEY_MOUSE_8 = %d,"%(highestid+8); keynames[highestid+8] = "mouse8" -print >>f, "\tKEY_MOUSE_WHEEL_UP = %d,"%(highestid+9); keynames[highestid+9] = "mousewheelup" -print >>f, "\tKEY_MOUSE_WHEEL_DOWN = %d,"%(highestid+10); keynames[highestid+10] = "mousewheeldown" -print >>f, "\tKEY_MOUSE_9 = %d,"%(highestid+11); keynames[highestid+11] = "mouse9" +print >>f, "\tKEY_MOUSE_9 = %d,"%(highestid+9); keynames[highestid+9] = "mouse9" +print >>f, "\tKEY_MOUSE_WHEEL_UP = %d,"%(highestid+10); keynames[highestid+10] = "mousewheelup" +print >>f, "\tKEY_MOUSE_WHEEL_DOWN = %d,"%(highestid+11); keynames[highestid+11] = "mousewheeldown" +print >>f, "\tKEY_MOUSE_WHEEL_LEFT = %d,"%(highestid+12); keynames[highestid+12] = "mousewheelleft" +print >>f, "\tKEY_MOUSE_WHEEL_RIGHT = %d,"%(highestid+13); keynames[highestid+13] = "mousewheelright" print >>f, "\tKEY_LAST = 512," print >>f, "};" diff --git a/src/engine/client/input.cpp b/src/engine/client/input.cpp index 885f77fc6..05e7bcb28 100644 --- a/src/engine/client/input.cpp +++ b/src/engine/client/input.cpp @@ -129,7 +129,9 @@ void CInput::Clear() bool CInput::KeyState(int Key) const { - return m_aInputState[Key>=KEY_MOUSE_1 ? Key : SDL_GetScancodeFromKey(KeyToKeycode(Key))]; + if(Key < 0 || Key >= KEY_LAST) + return false; + return m_aInputState[Key]; } void CInput::NextFrame() @@ -237,13 +239,13 @@ int CInput::Update() // Sum if you want to ignore multiple modifiers. if(!(Event.key.keysym.mod & g_Config.m_InpIgnoredModifiers)) { - Key = KeycodeToKey(Event.key.keysym.sym); + Key = Event.key.keysym.sym; Scancode = Event.key.keysym.scancode; } break; case SDL_KEYUP: Action = IInput::FLAG_RELEASE; - Key = KeycodeToKey(Event.key.keysym.sym); + Key = Event.key.keysym.sym; Scancode = Event.key.keysym.scancode; break; @@ -322,14 +324,14 @@ int CInput::Update() return 1; } - if(Key >= 0 && Key < g_MaxKeys && !IgnoreKeys && m_CountEditingText == 0) + if(Scancode >= 0 && Scancode < g_MaxKeys && !IgnoreKeys && m_CountEditingText == 0) { if(Action&IInput::FLAG_PRESS) { m_aInputState[Scancode] = 1; - m_aInputCount[Key] = m_InputCounter; + m_aInputCount[Scancode] = m_InputCounter; } - AddEvent(0, Key, Action); + AddEvent(0, Scancode, Action); } } diff --git a/src/engine/client/keynames.h b/src/engine/client/keynames.h index 56930626e..64bddd503 100644 --- a/src/engine/client/keynames.h +++ b/src/engine/client/keynames.h @@ -4,105 +4,14 @@ #error do not include this header! #endif +#include + const char g_aaKeyStrings[512][20] = { "unknown", "&1", "&2", "&3", - "&4", - "&5", - "&6", - "&7", - "backspace", - "tab", - "&10", - "&11", - "&12", - "return", - "&14", - "&15", - "&16", - "&17", - "&18", - "&19", - "&20", - "&21", - "&22", - "&23", - "&24", - "&25", - "&26", - "escape", - "&28", - "&29", - "&30", - "&31", - "space", - "exclaim", - "quotedbl", - "hash", - "dollar", - "percent", - "ampersand", - "quote", - "leftparen", - "rightparen", - "asterix", - "plus", - "comma", - "minus", - "period", - "slash", - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "colon", - "semicolon", - "less", - "equals", - "greater", - "question", - "at", - "&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", - "leftbracket", - "backslash", - "rightbracket", - "caret", - "underscore", - "backquote", "a", "b", "c", @@ -129,68 +38,33 @@ const char g_aaKeyStrings[512][20] = "x", "y", "z", - "&123", - "&124", - "&125", - "&126", - "delete", - "&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", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "0", + "return", + "escape", + "backspace", + "tab", + "space", + "minus", + "equals", + "leftbracket", + "rightbracket", + "backslash", + "nonushash", + "semicolon", + "apostrophe", + "grave", + "comma", + "period", + "slash", "capslock", "f1", "f2", @@ -210,7 +84,7 @@ const char g_aaKeyStrings[512][20] = "insert", "home", "pageup", - "&204", + "delete", "end", "pagedown", "right", @@ -234,7 +108,7 @@ const char g_aaKeyStrings[512][20] = "kp_9", "kp_0", "kp_period", - "&228", + "nonusbackslash", "application", "power", "kp_equals", @@ -264,29 +138,29 @@ const char g_aaKeyStrings[512][20] = "mute", "volumeup", "volumedown", - "&258", - "&259", - "&260", + "&130", + "&131", + "&132", "kp_comma", "kp_equalsas400", - "&263", - "&264", - "&265", - "&266", - "&267", - "&268", - "&269", - "&270", - "&271", - "&272", - "&273", - "&274", - "&275", - "&276", - "&277", - "&278", - "&279", - "&280", + "international1", + "international2", + "international3", + "international4", + "international5", + "international6", + "international7", + "international8", + "international9", + "lang1", + "lang2", + "lang3", + "lang4", + "lang5", + "lang6", + "lang7", + "lang8", + "lang9", "alterase", "sysreq", "cancel", @@ -299,17 +173,17 @@ const char g_aaKeyStrings[512][20] = "clearagain", "crsel", "exsel", - "&293", - "&294", - "&295", - "&296", - "&297", - "&298", - "&299", - "&300", - "&301", - "&302", - "&303", + "&165", + "&166", + "&167", + "&168", + "&169", + "&170", + "&171", + "&172", + "&173", + "&174", + "&175", "kp_00", "kp_000", "thousandsseparator", @@ -356,8 +230,8 @@ const char g_aaKeyStrings[512][20] = "kp_octal", "kp_decimal", "kp_hexadecimal", - "&350", - "&351", + "&222", + "&223", "lctrl", "lshift", "lalt", @@ -366,6 +240,134 @@ const char g_aaKeyStrings[512][20] = "rshift", "ralt", "rgui", + "&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", + "mode", + "audionext", + "audioprev", + "audiostop", + "audioplay", + "audiomute", + "mediaselect", + "www", + "mail", + "calculator", + "computer", + "ac_search", + "ac_home", + "ac_back", + "ac_forward", + "ac_stop", + "ac_refresh", + "ac_bookmarks", + "brightnessdown", + "brightnessup", + "displayswitch", + "kbdillumtoggle", + "kbdillumdown", + "kbdillumup", + "eject", + "sleep", + "app1", + "app2", + "mouse1", + "mouse2", + "mouse3", + "mouse4", + "mouse5", + "mouse6", + "mouse7", + "mouse8", + "mouse9", + "mousewheelup", + "mousewheeldown", + "mousewheelleft", + "mousewheelright", + "&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", @@ -391,45 +393,45 @@ const char g_aaKeyStrings[512][20] = "&382", "&383", "&384", - "mode", - "audionext", - "audioprev", - "audiostop", - "audioplay", - "audiomute", - "mediaselect", - "www", - "mail", - "calculator", - "computer", - "ac_search", - "ac_home", - "ac_back", - "ac_forward", - "ac_stop", - "ac_refresh", - "ac_bookmarks", - "brightnessdown", - "brightnessup", - "displayswitch", - "kbdillumtoggle", - "kbdillumdown", - "kpdillumup", - "eject", - "sleep", - "mouse1", - "mouse2", - "mouse3", - "mouse4", - "mouse5", - "mouse6", - "mouse7", - "mouse8", - "mouse9", - "mousewheelup", - "mousewheeldown", - "mousewheelleft", - "mousewheelright", + "&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", diff --git a/src/engine/keys.h b/src/engine/keys.h index 37a873e46..4e68e74e3 100644 --- a/src/engine/keys.h +++ b/src/engine/keys.h @@ -8,258 +8,260 @@ enum { KEY_FIRST = 0, KEY_UNKNOWN = 0, - KEY_BACKSPACE = 8, - KEY_TAB = 9, - KEY_RETURN = 13, - KEY_ESCAPE = 27, - KEY_SPACE = 32, - KEY_EXCLAIM = 33, - KEY_QUOTEDBL = 34, - KEY_HASH = 35, - KEY_DOLLAR = 36, - KEY_PERCENT = 37, - KEY_AMPERSAND = 38, - KEY_QUOTE = 39, - KEY_LEFTPAREN = 40, - KEY_RIGHTPAREN = 41, - KEY_ASTERISK = 42, - KEY_PLUS = 43, - KEY_COMMA = 44, + KEY_A = 4, + KEY_B = 5, + KEY_C = 6, + KEY_D = 7, + KEY_E = 8, + KEY_F = 9, + KEY_G = 10, + KEY_H = 11, + KEY_I = 12, + KEY_J = 13, + KEY_K = 14, + KEY_L = 15, + KEY_M = 16, + KEY_N = 17, + KEY_O = 18, + KEY_P = 19, + KEY_Q = 20, + KEY_R = 21, + KEY_S = 22, + KEY_T = 23, + KEY_U = 24, + KEY_V = 25, + KEY_W = 26, + KEY_X = 27, + KEY_Y = 28, + KEY_Z = 29, + KEY_1 = 30, + KEY_2 = 31, + KEY_3 = 32, + KEY_4 = 33, + KEY_5 = 34, + KEY_6 = 35, + KEY_7 = 36, + KEY_8 = 37, + KEY_9 = 38, + KEY_0 = 39, + KEY_RETURN = 40, + KEY_ESCAPE = 41, + KEY_BACKSPACE = 42, + KEY_TAB = 43, + KEY_SPACE = 44, KEY_MINUS = 45, - KEY_PERIOD = 46, - KEY_SLASH = 47, - KEY_0 = 48, - KEY_1 = 49, - KEY_2 = 50, - KEY_3 = 51, - KEY_4 = 52, - KEY_5 = 53, - KEY_6 = 54, - KEY_7 = 55, - KEY_8 = 56, - KEY_9 = 57, - KEY_COLON = 58, - KEY_SEMICOLON = 59, - KEY_LESS = 60, - KEY_EQUALS = 61, - KEY_GREATER = 62, - KEY_QUESTION = 63, - KEY_AT = 64, - KEY_LEFTBRACKET = 91, - KEY_BACKSLASH = 92, - KEY_RIGHTBRACKET = 93, - KEY_CARET = 94, - KEY_UNDERSCORE = 95, - KEY_BACKQUOTE = 96, - KEY_A = 97, - KEY_B = 98, - KEY_C = 99, - KEY_D = 100, - KEY_E = 101, - KEY_F = 102, - KEY_G = 103, - KEY_H = 104, - KEY_I = 105, - KEY_J = 106, - KEY_K = 107, - KEY_L = 108, - KEY_M = 109, - KEY_N = 110, - KEY_O = 111, - KEY_P = 112, - KEY_Q = 113, - KEY_R = 114, - KEY_S = 115, - KEY_T = 116, - KEY_U = 117, - KEY_V = 118, - KEY_W = 119, - KEY_X = 120, - KEY_Y = 121, - KEY_Z = 122, - KEY_DELETE = 127, - KEY_CAPSLOCK = 185, - KEY_F1 = 186, - KEY_F2 = 187, - KEY_F3 = 188, - KEY_F4 = 189, - KEY_F5 = 190, - KEY_F6 = 191, - KEY_F7 = 192, - KEY_F8 = 193, - KEY_F9 = 194, - KEY_F10 = 195, - KEY_F11 = 196, - KEY_F12 = 197, - KEY_PRINTSCREEN = 198, - KEY_SCROLLLOCK = 199, - KEY_PAUSE = 200, - KEY_INSERT = 201, - KEY_HOME = 202, - KEY_PAGEUP = 203, - KEY_END = 205, - KEY_PAGEDOWN = 206, - KEY_RIGHT = 207, - KEY_LEFT = 208, - KEY_DOWN = 209, - KEY_UP = 210, - KEY_NUMLOCKCLEAR = 211, - KEY_KP_DIVIDE = 212, - KEY_KP_MULTIPLY = 213, - KEY_KP_MINUS = 214, - KEY_KP_PLUS = 215, - KEY_KP_ENTER = 216, - KEY_KP_1 = 217, - KEY_KP_2 = 218, - KEY_KP_3 = 219, - KEY_KP_4 = 220, - KEY_KP_5 = 221, - KEY_KP_6 = 222, - KEY_KP_7 = 223, - KEY_KP_8 = 224, - KEY_KP_9 = 225, - KEY_KP_0 = 226, - KEY_KP_PERIOD = 227, - KEY_APPLICATION = 229, - KEY_POWER = 230, - KEY_KP_EQUALS = 231, - KEY_F13 = 232, - KEY_F14 = 233, - KEY_F15 = 234, - KEY_F16 = 235, - KEY_F17 = 236, - KEY_F18 = 237, - KEY_F19 = 238, - KEY_F20 = 239, - KEY_F21 = 240, - KEY_F22 = 241, - KEY_F23 = 242, - KEY_F24 = 243, - KEY_EXECUTE = 244, - KEY_HELP = 245, - KEY_MENU = 246, - KEY_SELECT = 247, - KEY_STOP = 248, - KEY_AGAIN = 249, - KEY_UNDO = 250, - KEY_CUT = 251, - KEY_COPY = 252, - KEY_PASTE = 253, - KEY_FIND = 254, - KEY_MUTE = 255, - KEY_VOLUMEUP = 256, - KEY_VOLUMEDOWN = 257, - KEY_KP_COMMA = 261, - KEY_KP_EQUALSAS400 = 262, - KEY_ALTERASE = 281, - KEY_SYSREQ = 282, - KEY_CANCEL = 283, - KEY_CLEAR = 284, - KEY_PRIOR = 285, - KEY_RETURN2 = 286, - KEY_SEPARATOR = 287, - KEY_OUT = 288, - KEY_OPER = 289, - KEY_CLEARAGAIN = 290, - KEY_CRSEL = 291, - KEY_EXSEL = 292, - KEY_KP_00 = 304, - KEY_KP_000 = 305, - KEY_THOUSANDSSEPARATOR = 306, - KEY_DECIMALSEPARATOR = 307, - KEY_CURRENCYUNIT = 308, - KEY_CURRENCYSUBUNIT = 309, - KEY_KP_LEFTPAREN = 310, - KEY_KP_RIGHTPAREN = 311, - KEY_KP_LEFTBRACE = 312, - KEY_KP_RIGHTBRACE = 313, - KEY_KP_TAB = 314, - KEY_KP_BACKSPACE = 315, - KEY_KP_A = 316, - KEY_KP_B = 317, - KEY_KP_C = 318, - KEY_KP_D = 319, - KEY_KP_E = 320, - KEY_KP_F = 321, - KEY_KP_XOR = 322, - KEY_KP_POWER = 323, - KEY_KP_PERCENT = 324, - KEY_KP_LESS = 325, - KEY_KP_GREATER = 326, - KEY_KP_AMPERSAND = 327, - KEY_KP_DBLAMPERSAND = 328, - KEY_KP_VERTICALBAR = 329, - KEY_KP_DBLVERTICALBAR = 330, - KEY_KP_COLON = 331, - KEY_KP_HASH = 332, - KEY_KP_SPACE = 333, - KEY_KP_AT = 334, - KEY_KP_EXCLAM = 335, - KEY_KP_MEMSTORE = 336, - KEY_KP_MEMRECALL = 337, - KEY_KP_MEMCLEAR = 338, - KEY_KP_MEMADD = 339, - KEY_KP_MEMSUBTRACT = 340, - KEY_KP_MEMMULTIPLY = 341, - KEY_KP_MEMDIVIDE = 342, - KEY_KP_PLUSMINUS = 343, - KEY_KP_CLEAR = 344, - KEY_KP_CLEARENTRY = 345, - KEY_KP_BINARY = 346, - KEY_KP_OCTAL = 347, - KEY_KP_DECIMAL = 348, - KEY_KP_HEXADECIMAL = 349, - KEY_LCTRL = 352, - KEY_LSHIFT = 353, - KEY_LALT = 354, - KEY_LGUI = 355, - KEY_RCTRL = 356, - KEY_RSHIFT = 357, - KEY_RALT = 358, - KEY_RGUI = 359, - KEY_MODE = 385, - KEY_AUDIONEXT = 386, - KEY_AUDIOPREV = 387, - KEY_AUDIOSTOP = 388, - KEY_AUDIOPLAY = 389, - KEY_AUDIOMUTE = 390, - KEY_MEDIASELECT = 391, - KEY_WWW = 392, - KEY_MAIL = 393, - KEY_CALCULATOR = 394, - KEY_COMPUTER = 395, - KEY_AC_SEARCH = 396, - KEY_AC_HOME = 397, - KEY_AC_BACK = 398, - KEY_AC_FORWARD = 399, - KEY_AC_STOP = 400, - KEY_AC_REFRESH = 401, - KEY_AC_BOOKMARKS = 402, - KEY_BRIGHTNESSDOWN = 403, - KEY_BRIGHTNESSUP = 404, - KEY_DISPLAYSWITCH = 405, - KEY_KBDILLUMTOGGLE = 406, - KEY_KBDILLUMDOWN = 407, - KEY_KBDILLUMUP = 408, - KEY_EJECT = 409, - KEY_SLEEP = 410, - KEY_MOUSE_1 = 411, - KEY_MOUSE_2 = 412, - KEY_MOUSE_3 = 413, - KEY_MOUSE_4 = 414, - KEY_MOUSE_5 = 415, - KEY_MOUSE_6 = 416, - KEY_MOUSE_7 = 417, - KEY_MOUSE_8 = 418, - KEY_MOUSE_9 = 419, - KEY_MOUSE_WHEEL_UP = 420, - KEY_MOUSE_WHEEL_DOWN = 421, - KEY_MOUSE_WHEEL_LEFT = 422, - KEY_MOUSE_WHEEL_RIGHT = 423, - KEY_LAST, + KEY_EQUALS = 46, + KEY_LEFTBRACKET = 47, + KEY_RIGHTBRACKET = 48, + KEY_BACKSLASH = 49, + KEY_NONUSHASH = 50, + KEY_SEMICOLON = 51, + KEY_APOSTROPHE = 52, + KEY_GRAVE = 53, + KEY_COMMA = 54, + KEY_PERIOD = 55, + KEY_SLASH = 56, + KEY_CAPSLOCK = 57, + KEY_F1 = 58, + KEY_F2 = 59, + KEY_F3 = 60, + KEY_F4 = 61, + KEY_F5 = 62, + KEY_F6 = 63, + KEY_F7 = 64, + KEY_F8 = 65, + KEY_F9 = 66, + KEY_F10 = 67, + KEY_F11 = 68, + KEY_F12 = 69, + KEY_PRINTSCREEN = 70, + KEY_SCROLLLOCK = 71, + KEY_PAUSE = 72, + KEY_INSERT = 73, + KEY_HOME = 74, + KEY_PAGEUP = 75, + KEY_DELETE = 76, + KEY_END = 77, + KEY_PAGEDOWN = 78, + KEY_RIGHT = 79, + KEY_LEFT = 80, + KEY_DOWN = 81, + KEY_UP = 82, + KEY_NUMLOCKCLEAR = 83, + KEY_KP_DIVIDE = 84, + KEY_KP_MULTIPLY = 85, + KEY_KP_MINUS = 86, + KEY_KP_PLUS = 87, + KEY_KP_ENTER = 88, + KEY_KP_1 = 89, + KEY_KP_2 = 90, + KEY_KP_3 = 91, + KEY_KP_4 = 92, + KEY_KP_5 = 93, + KEY_KP_6 = 94, + KEY_KP_7 = 95, + KEY_KP_8 = 96, + KEY_KP_9 = 97, + KEY_KP_0 = 98, + KEY_KP_PERIOD = 99, + KEY_NONUSBACKSLASH = 100, + KEY_APPLICATION = 101, + KEY_POWER = 102, + KEY_KP_EQUALS = 103, + KEY_F13 = 104, + KEY_F14 = 105, + KEY_F15 = 106, + KEY_F16 = 107, + KEY_F17 = 108, + KEY_F18 = 109, + KEY_F19 = 110, + KEY_F20 = 111, + KEY_F21 = 112, + KEY_F22 = 113, + KEY_F23 = 114, + KEY_F24 = 115, + KEY_EXECUTE = 116, + KEY_HELP = 117, + KEY_MENU = 118, + KEY_SELECT = 119, + KEY_STOP = 120, + KEY_AGAIN = 121, + KEY_UNDO = 122, + KEY_CUT = 123, + KEY_COPY = 124, + KEY_PASTE = 125, + KEY_FIND = 126, + KEY_MUTE = 127, + KEY_VOLUMEUP = 128, + KEY_VOLUMEDOWN = 129, + KEY_KP_COMMA = 133, + KEY_KP_EQUALSAS400 = 134, + KEY_INTERNATIONAL1 = 135, + KEY_INTERNATIONAL2 = 136, + KEY_INTERNATIONAL3 = 137, + KEY_INTERNATIONAL4 = 138, + KEY_INTERNATIONAL5 = 139, + KEY_INTERNATIONAL6 = 140, + KEY_INTERNATIONAL7 = 141, + KEY_INTERNATIONAL8 = 142, + KEY_INTERNATIONAL9 = 143, + KEY_LANG1 = 144, + KEY_LANG2 = 145, + KEY_LANG3 = 146, + KEY_LANG4 = 147, + KEY_LANG5 = 148, + KEY_LANG6 = 149, + KEY_LANG7 = 150, + KEY_LANG8 = 151, + KEY_LANG9 = 152, + KEY_ALTERASE = 153, + KEY_SYSREQ = 154, + KEY_CANCEL = 155, + KEY_CLEAR = 156, + KEY_PRIOR = 157, + KEY_RETURN2 = 158, + KEY_SEPARATOR = 159, + KEY_OUT = 160, + KEY_OPER = 161, + KEY_CLEARAGAIN = 162, + KEY_CRSEL = 163, + KEY_EXSEL = 164, + KEY_KP_00 = 176, + KEY_KP_000 = 177, + KEY_THOUSANDSSEPARATOR = 178, + KEY_DECIMALSEPARATOR = 179, + KEY_CURRENCYUNIT = 180, + KEY_CURRENCYSUBUNIT = 181, + KEY_KP_LEFTPAREN = 182, + KEY_KP_RIGHTPAREN = 183, + KEY_KP_LEFTBRACE = 184, + KEY_KP_RIGHTBRACE = 185, + KEY_KP_TAB = 186, + KEY_KP_BACKSPACE = 187, + KEY_KP_A = 188, + KEY_KP_B = 189, + KEY_KP_C = 190, + KEY_KP_D = 191, + KEY_KP_E = 192, + KEY_KP_F = 193, + KEY_KP_XOR = 194, + KEY_KP_POWER = 195, + KEY_KP_PERCENT = 196, + KEY_KP_LESS = 197, + KEY_KP_GREATER = 198, + KEY_KP_AMPERSAND = 199, + KEY_KP_DBLAMPERSAND = 200, + KEY_KP_VERTICALBAR = 201, + KEY_KP_DBLVERTICALBAR = 202, + KEY_KP_COLON = 203, + KEY_KP_HASH = 204, + KEY_KP_SPACE = 205, + KEY_KP_AT = 206, + KEY_KP_EXCLAM = 207, + KEY_KP_MEMSTORE = 208, + KEY_KP_MEMRECALL = 209, + KEY_KP_MEMCLEAR = 210, + KEY_KP_MEMADD = 211, + KEY_KP_MEMSUBTRACT = 212, + KEY_KP_MEMMULTIPLY = 213, + KEY_KP_MEMDIVIDE = 214, + KEY_KP_PLUSMINUS = 215, + KEY_KP_CLEAR = 216, + KEY_KP_CLEARENTRY = 217, + KEY_KP_BINARY = 218, + KEY_KP_OCTAL = 219, + KEY_KP_DECIMAL = 220, + KEY_KP_HEXADECIMAL = 221, + KEY_LCTRL = 224, + KEY_LSHIFT = 225, + KEY_LALT = 226, + KEY_LGUI = 227, + KEY_RCTRL = 228, + KEY_RSHIFT = 229, + KEY_RALT = 230, + KEY_RGUI = 231, + KEY_MODE = 257, + KEY_AUDIONEXT = 258, + KEY_AUDIOPREV = 259, + KEY_AUDIOSTOP = 260, + KEY_AUDIOPLAY = 261, + KEY_AUDIOMUTE = 262, + KEY_MEDIASELECT = 263, + KEY_WWW = 264, + KEY_MAIL = 265, + KEY_CALCULATOR = 266, + KEY_COMPUTER = 267, + KEY_AC_SEARCH = 268, + KEY_AC_HOME = 269, + KEY_AC_BACK = 270, + KEY_AC_FORWARD = 271, + KEY_AC_STOP = 272, + KEY_AC_REFRESH = 273, + KEY_AC_BOOKMARKS = 274, + KEY_BRIGHTNESSDOWN = 275, + KEY_BRIGHTNESSUP = 276, + KEY_DISPLAYSWITCH = 277, + KEY_KBDILLUMTOGGLE = 278, + KEY_KBDILLUMDOWN = 279, + KEY_KBDILLUMUP = 280, + KEY_EJECT = 281, + KEY_SLEEP = 282, + KEY_APP1 = 283, + KEY_APP2 = 284, + KEY_MOUSE_1 = 285, + KEY_MOUSE_2 = 286, + KEY_MOUSE_3 = 287, + KEY_MOUSE_4 = 288, + KEY_MOUSE_5 = 289, + KEY_MOUSE_6 = 290, + KEY_MOUSE_7 = 291, + KEY_MOUSE_8 = 292, + KEY_MOUSE_9 = 293, + KEY_MOUSE_WHEEL_UP = 294, + KEY_MOUSE_WHEEL_DOWN = 295, + KEY_MOUSE_WHEEL_LEFT = 296, + KEY_MOUSE_WHEEL_RIGHT = 297, + KEY_LAST = 512, }; -inline int KeyToKeycode(int Key) { return (Key>=0x80) ? (Key-0x80)|(1<<30) : Key; }; -inline int KeycodeToKey(int Keycode) { return (Keycode&(1<<30)) ? Keycode-(1<<30)+0x80 : Keycode; }; - #endif diff --git a/src/game/client/components/binds.cpp b/src/game/client/components/binds.cpp index e9592f9d9..129131065 100644 --- a/src/game/client/components/binds.cpp +++ b/src/game/client/components/binds.cpp @@ -121,7 +121,7 @@ void CBinds::SetDefaults() Bind(KEY_F1, "toggle_local_console"); Bind(KEY_F2, "toggle_remote_console"); Bind(KEY_TAB, "+scoreboard"); - Bind(KEY_BACKQUOTE, "+statboard"); + Bind(KEY_EQUALS, "+statboard"); Bind(KEY_F10, "screenshot"); Bind(KEY_A, "+left"); @@ -161,7 +161,6 @@ void CBinds::SetDefaults() Bind(KEY_T, "+show_chat; chat all"); Bind(KEY_Y, "+show_chat; chat team"); - Bind(KEY_Z, "+show_chat; chat team"); // For German keyboards Bind(KEY_U, "+show_chat"); Bind(KEY_I, "+show_chat; chat all /c ");