////////////////////////////////////////////////////////////////////////////////
//    Scorched3D (c) 2000-2011, 2026
//
//    This file is part of Scorched3D.
//
//    Scorched3D is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 2 of the License, or
//    (at your option) any later version.
//
//    Scorched3D is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License along
//    with this program; if not, write to the Free Software Foundation, Inc.,
//    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
////////////////////////////////////////////////////////////////////////////////

#ifndef __INCLUDE_KeyTranslateWx_hpp_INCLUDE__
#define __INCLUDE_KeyTranslateWx_hpp_INCLUDE__

// NOTE: avoid WX warnings
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wabi-tag"
#pragma GCC diagnostic ignored "-Winline"
#pragma GCC diagnostic ignored "-Wmissing-declarations"
#pragma GCC diagnostic ignored "-Wpadded"
#pragma GCC diagnostic ignored "-Wredundant-tags"
#pragma GCC diagnostic ignored "-Wsuggest-final-methods"
#pragma GCC diagnostic ignored "-Wswitch-default"
#pragma GCC diagnostic ignored "-Wunused-const-variable"
#pragma GCC diagnostic ignored "-Wuseless-cast"

#include <wx/defs.h>

#pragma GCC diagnostic pop

#include <SDL/SDL_keysym.h>

struct KeyTranslationWx
{
	const char*  keyName;
	unsigned int keySym;
	unsigned int wxKeySym;
} KeyTranslationTableWx[] = {
	// clang-format off
	// uncrustify off
	{ "UNKNOWN",      SDLK_UNKNOWN,      WXK_NONE            },
	{ "FIRST",        SDLK_FIRST,        WXK_NONE            },
	{ "BACKSPACE",    SDLK_BACKSPACE,    WXK_BACK            },
	{ "TAB",          SDLK_TAB,          WXK_TAB             },
	{ "CLEAR",        SDLK_CLEAR,        WXK_CLEAR           },
	{ "RETURN",       SDLK_RETURN,       WXK_RETURN          },
	{ "PAUSE",        SDLK_PAUSE,        WXK_PAUSE           },
	{ "ESCAPE",       SDLK_ESCAPE,       WXK_ESCAPE          },
	{ "SPACE",        SDLK_SPACE,        WXK_SPACE           },
	{ "EXCLAIM",      SDLK_EXCLAIM,      '!'                 },
	{ "QUOTEDBL",     SDLK_QUOTEDBL,     '"'                 },
	{ "HASH",         SDLK_HASH,         '#'                 },
	{ "DOLLAR",       SDLK_DOLLAR,       '$'                 },
	{ "AMPERSAND",    SDLK_AMPERSAND,    '&'                 },
	{ "QUOTE",        SDLK_QUOTE,        '\''                },
	{ "LEFTPAREN",    SDLK_LEFTPAREN,    '['                 },
	{ "RIGHTPAREN",   SDLK_RIGHTPAREN,   ']'                 },
	{ "ASTERISK",     SDLK_ASTERISK,     '*'                 },
	{ "PLUS",         SDLK_PLUS,         '+'                 },
	{ "COMMA",        SDLK_COMMA,        ','                 },
	{ "MINUS",        SDLK_MINUS,        '-'                 },
	{ "PERIOD",       SDLK_PERIOD,       '.'                 },
	{ "SLASH",        SDLK_SLASH,        '/'                 },
	{ "0",            SDLK_0,            '0'                 },
	{ "1",            SDLK_1,            '1'                 },
	{ "2",            SDLK_2,            '2'                 },
	{ "3",            SDLK_3,            '3'                 },
	{ "4",            SDLK_4,            '4'                 },
	{ "5",            SDLK_5,            '5'                 },
	{ "6",            SDLK_6,            '6'                 },
	{ "7",            SDLK_7,            '7'                 },
	{ "8",            SDLK_8,            '8'                 },
	{ "9",            SDLK_9,            '9'                 },
	{ "COLON",        SDLK_COLON,        ':'                 },
	{ "SEMICOLON",    SDLK_SEMICOLON,    ';'                 },
	{ "LESS",         SDLK_LESS,         '<'                 },
	{ "EQUALS",       SDLK_EQUALS,       '='                 },
	{ "GREATER",      SDLK_GREATER,      '>'                 },
	{ "QUESTION",     SDLK_QUESTION,     '?'                 },
	{ "AT",           SDLK_AT,           '@'                 },
	{ "LEFTBRACKET",  SDLK_LEFTBRACKET,  '('                 },
	{ "BACKSLASH",    SDLK_BACKSLASH,    '\\'                },
	{ "RIGHTBRACKET", SDLK_RIGHTBRACKET, ')'                 },
	{ "CARET",        SDLK_CARET,        '\''                },
	{ "UNDERSCORE",   SDLK_UNDERSCORE,   '_'                 },
	{ "BACKQUOTE",    SDLK_BACKQUOTE,    '`'                 },
	{ "a",            SDLK_a,            'A'                 },
	{ "b",            SDLK_b,            'B'                 },
	{ "c",            SDLK_c,            'C'                 },
	{ "d",            SDLK_d,            'D'                 },
	{ "e",            SDLK_e,            'E'                 },
	{ "f",            SDLK_f,            'F'                 },
	{ "g",            SDLK_g,            'G'                 },
	{ "h",            SDLK_h,            'H'                 },
	{ "i",            SDLK_i,            'I'                 },
	{ "j",            SDLK_j,            'J'                 },
	{ "k",            SDLK_k,            'K'                 },
	{ "l",            SDLK_l,            'L'                 },
	{ "m",            SDLK_m,            'M'                 },
	{ "n",            SDLK_n,            'N'                 },
	{ "o",            SDLK_o,            'O'                 },
	{ "p",            SDLK_p,            'P'                 },
	{ "q",            SDLK_q,            'Q'                 },
	{ "r",            SDLK_r,            'R'                 },
	{ "s",            SDLK_s,            'S'                 },
	{ "t",            SDLK_t,            'T'                 },
	{ "u",            SDLK_u,            'U'                 },
	{ "v",            SDLK_v,            'V'                 },
	{ "w",            SDLK_w,            'W'                 },
	{ "x",            SDLK_x,            'X'                 },
	{ "y",            SDLK_y,            'Y'                 },
	{ "z",            SDLK_z,            'Z'                 },
	{ "DELETE",       SDLK_DELETE,       WXK_DELETE          },
	{ "WORLD_0",      SDLK_WORLD_0,      WXK_NONE            },
	{ "WORLD_1",      SDLK_WORLD_1,      WXK_NONE            },
	{ "WORLD_2",      SDLK_WORLD_2,      WXK_NONE            },
	{ "WORLD_3",      SDLK_WORLD_3,      WXK_NONE            },
	{ "WORLD_4",      SDLK_WORLD_4,      WXK_NONE            },
	{ "WORLD_5",      SDLK_WORLD_5,      WXK_NONE            },
	{ "WORLD_6",      SDLK_WORLD_6,      WXK_NONE            },
	{ "WORLD_7",      SDLK_WORLD_7,      WXK_NONE            },
	{ "WORLD_8",      SDLK_WORLD_8,      WXK_NONE            },
	{ "WORLD_9",      SDLK_WORLD_9,      WXK_NONE            },
	{ "WORLD_10",     SDLK_WORLD_10,     WXK_NONE            },
	{ "WORLD_11",     SDLK_WORLD_11,     WXK_NONE            },
	{ "WORLD_12",     SDLK_WORLD_12,     WXK_NONE            },
	{ "WORLD_13",     SDLK_WORLD_13,     WXK_NONE            },
	{ "WORLD_14",     SDLK_WORLD_14,     WXK_NONE            },
	{ "WORLD_15",     SDLK_WORLD_15,     WXK_NONE            },
	{ "WORLD_16",     SDLK_WORLD_16,     WXK_NONE            },
	{ "WORLD_17",     SDLK_WORLD_17,     WXK_NONE            },
	{ "WORLD_18",     SDLK_WORLD_18,     WXK_NONE            },
	{ "WORLD_19",     SDLK_WORLD_19,     WXK_NONE            },
	{ "WORLD_20",     SDLK_WORLD_20,     WXK_NONE            },
	{ "WORLD_21",     SDLK_WORLD_21,     WXK_NONE            },
	{ "WORLD_22",     SDLK_WORLD_22,     WXK_NONE            },
	{ "WORLD_23",     SDLK_WORLD_23,     WXK_NONE            },
	{ "WORLD_24",     SDLK_WORLD_24,     WXK_NONE            },
	{ "WORLD_25",     SDLK_WORLD_25,     WXK_NONE            },
	{ "WORLD_26",     SDLK_WORLD_26,     WXK_NONE            },
	{ "WORLD_27",     SDLK_WORLD_27,     WXK_NONE            },
	{ "WORLD_28",     SDLK_WORLD_28,     WXK_NONE            },
	{ "WORLD_29",     SDLK_WORLD_29,     WXK_NONE            },
	{ "WORLD_30",     SDLK_WORLD_30,     WXK_NONE            },
	{ "WORLD_31",     SDLK_WORLD_31,     WXK_NONE            },
	{ "WORLD_32",     SDLK_WORLD_32,     WXK_NONE            },
	{ "WORLD_33",     SDLK_WORLD_33,     WXK_NONE            },
	{ "WORLD_34",     SDLK_WORLD_34,     WXK_NONE            },
	{ "WORLD_35",     SDLK_WORLD_35,     WXK_NONE            },
	{ "WORLD_36",     SDLK_WORLD_36,     WXK_NONE            },
	{ "WORLD_37",     SDLK_WORLD_37,     WXK_NONE            },
	{ "WORLD_38",     SDLK_WORLD_38,     WXK_NONE            },
	{ "WORLD_39",     SDLK_WORLD_39,     WXK_NONE            },
	{ "WORLD_40",     SDLK_WORLD_40,     WXK_NONE            },
	{ "WORLD_41",     SDLK_WORLD_41,     WXK_NONE            },
	{ "WORLD_42",     SDLK_WORLD_42,     WXK_NONE            },
	{ "WORLD_43",     SDLK_WORLD_43,     WXK_NONE            },
	{ "WORLD_44",     SDLK_WORLD_44,     WXK_NONE            },
	{ "WORLD_45",     SDLK_WORLD_45,     WXK_NONE            },
	{ "WORLD_46",     SDLK_WORLD_46,     WXK_NONE            },
	{ "WORLD_47",     SDLK_WORLD_47,     WXK_NONE            },
	{ "WORLD_48",     SDLK_WORLD_48,     WXK_NONE            },
	{ "WORLD_49",     SDLK_WORLD_49,     WXK_NONE            },
	{ "WORLD_50",     SDLK_WORLD_50,     WXK_NONE            },
	{ "WORLD_51",     SDLK_WORLD_51,     WXK_NONE            },
	{ "WORLD_52",     SDLK_WORLD_52,     WXK_NONE            },
	{ "WORLD_53",     SDLK_WORLD_53,     WXK_NONE            },
	{ "WORLD_54",     SDLK_WORLD_54,     WXK_NONE            },
	{ "WORLD_55",     SDLK_WORLD_55,     WXK_NONE            },
	{ "WORLD_56",     SDLK_WORLD_56,     WXK_NONE            },
	{ "WORLD_57",     SDLK_WORLD_57,     WXK_NONE            },
	{ "WORLD_58",     SDLK_WORLD_58,     WXK_NONE            },
	{ "WORLD_59",     SDLK_WORLD_59,     WXK_NONE            },
	{ "WORLD_60",     SDLK_WORLD_60,     WXK_NONE            },
	{ "WORLD_61",     SDLK_WORLD_61,     WXK_NONE            },
	{ "WORLD_62",     SDLK_WORLD_62,     WXK_NONE            },
	{ "WORLD_63",     SDLK_WORLD_63,     WXK_NONE            },
	{ "WORLD_64",     SDLK_WORLD_64,     WXK_NONE            },
	{ "WORLD_65",     SDLK_WORLD_65,     WXK_NONE            },
	{ "WORLD_66",     SDLK_WORLD_66,     WXK_NONE            },
	{ "WORLD_67",     SDLK_WORLD_67,     WXK_NONE            },
	{ "WORLD_68",     SDLK_WORLD_68,     WXK_NONE            },
	{ "WORLD_69",     SDLK_WORLD_69,     WXK_NONE            },
	{ "WORLD_70",     SDLK_WORLD_70,     WXK_NONE            },
	{ "WORLD_71",     SDLK_WORLD_71,     WXK_NONE            },
	{ "WORLD_72",     SDLK_WORLD_72,     WXK_NONE            },
	{ "WORLD_73",     SDLK_WORLD_73,     WXK_NONE            },
	{ "WORLD_74",     SDLK_WORLD_74,     WXK_NONE            },
	{ "WORLD_75",     SDLK_WORLD_75,     WXK_NONE            },
	{ "WORLD_76",     SDLK_WORLD_76,     WXK_NONE            },
	{ "WORLD_77",     SDLK_WORLD_77,     WXK_NONE            },
	{ "WORLD_78",     SDLK_WORLD_78,     WXK_NONE            },
	{ "WORLD_79",     SDLK_WORLD_79,     WXK_NONE            },
	{ "WORLD_80",     SDLK_WORLD_80,     WXK_NONE            },
	{ "WORLD_81",     SDLK_WORLD_81,     WXK_NONE            },
	{ "WORLD_82",     SDLK_WORLD_82,     WXK_NONE            },
	{ "WORLD_83",     SDLK_WORLD_83,     WXK_NONE            },
	{ "WORLD_84",     SDLK_WORLD_84,     WXK_NONE            },
	{ "WORLD_85",     SDLK_WORLD_85,     WXK_NONE            },
	{ "WORLD_86",     SDLK_WORLD_86,     WXK_NONE            },
	{ "WORLD_87",     SDLK_WORLD_87,     WXK_NONE            },
	{ "WORLD_88",     SDLK_WORLD_88,     WXK_NONE            },
	{ "WORLD_89",     SDLK_WORLD_89,     WXK_NONE            },
	{ "WORLD_90",     SDLK_WORLD_90,     WXK_NONE            },
	{ "WORLD_91",     SDLK_WORLD_91,     WXK_NONE            },
	{ "WORLD_92",     SDLK_WORLD_92,     WXK_NONE            },
	{ "WORLD_93",     SDLK_WORLD_93,     WXK_NONE            },
	{ "WORLD_94",     SDLK_WORLD_94,     WXK_NONE            },
	{ "WORLD_95",     SDLK_WORLD_95,     WXK_NONE            },
	{ "KP0",          SDLK_KP0,          WXK_NUMPAD0         },
	{ "KP1",          SDLK_KP1,          WXK_NUMPAD1         },
	{ "KP2",          SDLK_KP2,          WXK_NUMPAD2         },
	{ "KP3",          SDLK_KP3,          WXK_NUMPAD3         },
	{ "KP4",          SDLK_KP4,          WXK_NUMPAD4         },
	{ "KP5",          SDLK_KP5,          WXK_NUMPAD5         },
	{ "KP6",          SDLK_KP6,          WXK_NUMPAD6         },
	{ "KP7",          SDLK_KP7,          WXK_NUMPAD7         },
	{ "KP8",          SDLK_KP8,          WXK_NUMPAD8         },
	{ "KP9",          SDLK_KP9,          WXK_NUMPAD9         },
	{ "KP_PERIOD",    SDLK_KP_PERIOD,    WXK_NUMPAD_DECIMAL  },
	{ "KP_DIVIDE",    SDLK_KP_DIVIDE,    WXK_NUMPAD_DIVIDE   },
	{ "KP_MULTIPLY",  SDLK_KP_MULTIPLY,  WXK_NUMPAD_MULTIPLY },
	{ "KP_MINUS",     SDLK_KP_MINUS,     WXK_NUMPAD_SUBTRACT },
	{ "KP_PLUS",      SDLK_KP_PLUS,      WXK_NUMPAD_ADD      },
	{ "KP_ENTER",     SDLK_KP_ENTER,     WXK_NUMPAD_ENTER    },
	{ "KP_EQUALS",    SDLK_KP_EQUALS,    WXK_NUMPAD_EQUAL    },
	{ "UP",           SDLK_UP,           WXK_UP              },
	{ "DOWN",         SDLK_DOWN,         WXK_DOWN            },
	{ "RIGHT",        SDLK_RIGHT,        WXK_RIGHT           },
	{ "LEFT",         SDLK_LEFT,         WXK_LEFT            },
	{ "INSERT",       SDLK_INSERT,       WXK_INSERT          },
	{ "HOME",         SDLK_HOME,         WXK_HOME            },
	{ "END",          SDLK_END,          WXK_END             },
	{ "PAGEUP",       SDLK_PAGEUP,       WXK_PAGEUP          },
	{ "PAGEDOWN",     SDLK_PAGEDOWN,     WXK_PAGEDOWN        },
	{ "F1",           SDLK_F1,           WXK_F1              },
	{ "F2",           SDLK_F2,           WXK_F2              },
	{ "F3",           SDLK_F3,           WXK_F3              },
	{ "F4",           SDLK_F4,           WXK_F4              },
	{ "F5",           SDLK_F5,           WXK_F5              },
	{ "F6",           SDLK_F6,           WXK_F6              },
	{ "F7",           SDLK_F7,           WXK_F7              },
	{ "F8",           SDLK_F8,           WXK_F8              },
	{ "F9",           SDLK_F9,           WXK_F9              },
	{ "F10",          SDLK_F10,          WXK_F10             },
	{ "F11",          SDLK_F11,          WXK_F11             },
	{ "F12",          SDLK_F12,          WXK_F12             },
	{ "F13",          SDLK_F13,          WXK_F13             },
	{ "F14",          SDLK_F14,          WXK_F14             },
	{ "F15",          SDLK_F15,          WXK_F15             },
	{ "NUMLOCK",      SDLK_NUMLOCK,      WXK_NUMLOCK         },
	{ "CAPSLOCK",     SDLK_CAPSLOCK,     WXK_CAPITAL         },
	{ "SCROLLOCK",    SDLK_SCROLLOCK,    WXK_SCROLL          },
	{ "RSHIFT",       SDLK_RSHIFT,       WXK_NONE            },
	{ "LSHIFT",       SDLK_LSHIFT,       WXK_SHIFT           },
	{ "RCTRL",        SDLK_RCTRL,        WXK_NONE            },
	{ "LCTRL",        SDLK_LCTRL,        WXK_CONTROL         },
	{ "RALT",         SDLK_RALT,         WXK_ALT             },
	{ "LALT",         SDLK_LALT,         WXK_MENU            },
	{ "RMETA",        SDLK_RMETA,        WXK_NONE            },
	{ "LMETA",        SDLK_LMETA,        WXK_NONE            },
	{ "LSUPER",       SDLK_LSUPER,       WXK_NONE            },
	{ "RSUPER",       SDLK_RSUPER,       WXK_NONE            },
	{ "MODE",         SDLK_MODE,         WXK_NONE            },
	{ "COMPOSE",      SDLK_COMPOSE,      WXK_NONE            },
	{ "HELP",         SDLK_HELP,         WXK_HELP            },
	{ "PRINT",        SDLK_PRINT,        WXK_PRINT           },
	{ "SYSREQ",       SDLK_SYSREQ,       WXK_NONE            },
	{ "BREAK",        SDLK_BREAK,        WXK_NONE            },
	{ "MENU",         SDLK_MENU,         WXK_MENU            },
	{ "POWER",        SDLK_POWER,        WXK_NONE            },
	{ "EURO",         SDLK_EURO,         WXK_NONE            },
	{ "UNDO",         SDLK_UNDO,         WXK_NONE            },
	{ "LAST",         SDLK_LAST,         WXK_NONE            },
	// uncrustify on
	// clang-format on
};

#endif  // __INCLUDE_KeyTranslateWx_hpp_INCLUDE__
