---@field 1 index 
---@field 2 name
---@field 3 qwerty
---@field 4 xbox
local input_mappings = {
  {0, "INPUT_NEXT_CAMERA", "V", "BACK"},
  {1, "INPUT_LOOK_LR", "MOUSE RIGHT", "RIGHT STICK"},
  {2, "INPUT_LOOK_UD", "MOUSE DOWN", "RIGHT STICK"},
  {3, "INPUT_LOOK_UP_ONLY", "(NONE)", "RIGHT STICK"},
  {4, "INPUT_LOOK_DOWN_ONLY", "MOUSE DOWN", "RIGHT STICK"},
  {5, "INPUT_LOOK_LEFT_ONLY", "(NONE)", "RIGHT STICK"},
  {6, "INPUT_LOOK_RIGHT_ONLY", "MOUSE RIGHT", "RIGHT STICK"},
  {7, "INPUT_CINEMATIC_SLOWMO", "(NONE)", "R3"},
  {8, "INPUT_SCRIPTED_FLY_UD", "S", "LEFT STICK"},
  {9, "INPUT_SCRIPTED_FLY_LR", "D", "LEFT STICK"},
  {10, "INPUT_SCRIPTED_FLY_ZUP", "PAGEUP", "LT"},
  {11, "INPUT_SCRIPTED_FLY_ZDOWN", "PAGEDOWN", "RT"},
  {12, "INPUT_WEAPON_WHEEL_UD", "MOUSE DOWN", "RIGHT STICK"},
  {13, "INPUT_WEAPON_WHEEL_LR", "MOUSE RIGHT", "RIGHT STICK"},
  {14, "INPUT_WEAPON_WHEEL_NEXT", "SCROLLWHEEL DOWN", "DPAD RIGHT"},
  {15, "INPUT_WEAPON_WHEEL_PREV", "SCROLLWHEEL UP", "DPAD LEFT"},
  {16, "INPUT_SELECT_NEXT_WEAPON", "SCROLLWHEEL DOWN", "(NONE)"},
  {17, "INPUT_SELECT_PREV_WEAPON", "SCROLLWHEEL UP", "(NONE)"},
  {18, "INPUT_SKIP_CUTSCENE", "ENTER / LEFT MOUSE BUTTON / SPACEBAR", "A"},
  {19, "INPUT_CHARACTER_WHEEL", "LEFT ALT", "DPAD DOWN"},
  {20, "INPUT_MULTIPLAYER_INFO", "Z", "DPAD DOWN"},
  {21, "INPUT_SPRINT", "LEFT SHIFT", "A"},
  {22, "INPUT_JUMP", "SPACEBAR", "X"},
  {23, "INPUT_ENTER", "F", "Y"},
  {24, "INPUT_ATTACK", "LEFT MOUSE BUTTON", "RT"},
  {25, "INPUT_AIM", "RIGHT MOUSE BUTTON", "LT"},
  {26, "INPUT_LOOK_BEHIND", "C", "R3"},
  {27, "INPUT_PHONE", "ARROW UP / SCROLLWHEEL BUTTON (PRESS)", "DPAD UP"},
  {28, "INPUT_SPECIAL_ABILITY", "(NONE)", "L3"},
  {29, "INPUT_SPECIAL_ABILITY_SECONDARY", "B", "R3"},
  {30, "INPUT_MOVE_LR", "D", "LEFT STICK"},
  {31, "INPUT_MOVE_UD", "S", "LEFT STICK"},
  {32, "INPUT_MOVE_UP_ONLY", "W", "LEFT STICK"},
  {33, "INPUT_MOVE_DOWN_ONLY", "S", "LEFT STICK"},
  {34, "INPUT_MOVE_LEFT_ONLY", "A", "LEFT STICK"},
  {35, "INPUT_MOVE_RIGHT_ONLY", "D", "LEFT STICK"},
  {36, "INPUT_DUCK", "LEFT CTRL", "L3"},
  {37, "INPUT_SELECT_WEAPON", "TAB", "LB"},
  {38, "INPUT_PICKUP", "E", "LB"},
  {39, "INPUT_SNIPER_ZOOM", "[", "LEFT STICK"},
  {40, "INPUT_SNIPER_ZOOM_IN_ONLY", "]", "LEFT STICK"},
  {41, "INPUT_SNIPER_ZOOM_OUT_ONLY", "[", "LEFT STICK"},
  {42, "INPUT_SNIPER_ZOOM_IN_SECONDARY", "]", "DPAD UP"},
  {43, "INPUT_SNIPER_ZOOM_OUT_SECONDARY", "[", "DPAD DOWN"},
  {44, "INPUT_COVER", "Q", "RB"},
  {45, "INPUT_RELOAD", "R", "B"},
  {46, "INPUT_TALK", "E", "DPAD RIGHT"},
  {47, "INPUT_DETONATE", "G", "DPAD LEFT"},
  {48, "INPUT_HUD_SPECIAL", "Z", "DPAD DOWN"},
  {49, "INPUT_ARREST", "F", "Y"},
  {50, "INPUT_ACCURATE_AIM", "SCROLLWHEEL DOWN", "R3"},
  {51, "INPUT_CONTEXT", "E", "DPAD RIGHT"},
  {52, "INPUT_CONTEXT_SECONDARY", "Q", "DPAD LEFT"},
  {53, "INPUT_WEAPON_SPECIAL", "(NONE)", "Y"},
  {54, "INPUT_WEAPON_SPECIAL_TWO", "E", "DPAD RIGHT"},
  {55, "INPUT_DIVE", "SPACEBAR", "RB"},
  {56, "INPUT_DROP_WEAPON", "F9", "Y"},
  {57, "INPUT_DROP_AMMO", "F10", "B"},
  {58, "INPUT_THROW_GRENADE", "G", "DPAD LEFT"},
  {59, "INPUT_VEH_MOVE_LR", "D", "LEFT STICK"},
  {60, "INPUT_VEH_MOVE_UD", "LEFT CTRL", "LEFT STICK"},
  {61, "INPUT_VEH_MOVE_UP_ONLY", "LEFT SHIFT", "LEFT STICK"},
  {62, "INPUT_VEH_MOVE_DOWN_ONLY", "LEFT CTRL", "LEFT STICK"},
  {63, "INPUT_VEH_MOVE_LEFT_ONLY", "A", "LEFT STICK"},
  {64, "INPUT_VEH_MOVE_RIGHT_ONLY", "D", "LEFT STICK"},
  {65, "INPUT_VEH_SPECIAL", "(NONE)", "(NONE)"},
  {66, "INPUT_VEH_GUN_LR", "MOUSE RIGHT", "RIGHT STICK"},
  {67, "INPUT_VEH_GUN_UD", "MOUSE DOWN", "RIGHT STICK"},
  {68, "INPUT_VEH_AIM", "RIGHT MOUSE BUTTON", "LB"},
  {69, "INPUT_VEH_ATTACK", "LEFT MOUSE BUTTON", "RB"},
  {70, "INPUT_VEH_ATTACK2", "RIGHT MOUSE BUTTON", "A"},
  {71, "INPUT_VEH_ACCELERATE", "W", "RT"},
  {72, "INPUT_VEH_BRAKE", "S", "LT"},
  {73, "INPUT_VEH_DUCK", "X", "A"},
  {74, "INPUT_VEH_HEADLIGHT", "H", "DPAD RIGHT"},
  {75, "INPUT_VEH_EXIT", "F", "Y"},
  {76, "INPUT_VEH_HANDBRAKE", "SPACEBAR", "RB"},
  {77, "INPUT_VEH_HOTWIRE_LEFT", "W", "LT"},
  {78, "INPUT_VEH_HOTWIRE_RIGHT", "S", "RT"},
  {79, "INPUT_VEH_LOOK_BEHIND", "C", "R3"},
  {80, "INPUT_VEH_CIN_CAM", "R", "B"},
  {81, "INPUT_VEH_NEXT_RADIO", ".", "(NONE)"},
  {82, "INPUT_VEH_PREV_RADIO", ",", "(NONE)"},
  {83, "INPUT_VEH_NEXT_RADIO_TRACK", "=", "(NONE)"},
  {84, "INPUT_VEH_PREV_RADIO_TRACK", "-", "(NONE)"},
  {85, "INPUT_VEH_RADIO_WHEEL", "Q", "DPAD LEFT"},
  {86, "INPUT_VEH_HORN", "E", "L3"},
  {87, "INPUT_VEH_FLY_THROTTLE_UP", "W", "RT"},
  {88, "INPUT_VEH_FLY_THROTTLE_DOWN", "S", "LT"},
  {89, "INPUT_VEH_FLY_YAW_LEFT", "A", "LB"},
  {90, "INPUT_VEH_FLY_YAW_RIGHT", "D", "RB"},
  {91, "INPUT_VEH_PASSENGER_AIM", "RIGHT MOUSE BUTTON", "LT"},
  {92, "INPUT_VEH_PASSENGER_ATTACK", "LEFT MOUSE BUTTON", "RT"},
  {93, "INPUT_VEH_SPECIAL_ABILITY_FRANKLIN", "(NONE)", "R3"},
  {94, "INPUT_VEH_STUNT_UD", "(NONE)", "(NONE)"},
  {95, "INPUT_VEH_CINEMATIC_UD", "MOUSE DOWN", "RIGHT STICK"},
  {96, "INPUT_VEH_CINEMATIC_UP_ONLY", "NUMPAD- / SCROLLWHEEL UP", "(NONE)"},
  {97, "INPUT_VEH_CINEMATIC_DOWN_ONLY", "NUMPAD+ / SCROLLWHEEL DOWN", "(NONE)"},
  {98, "INPUT_VEH_CINEMATIC_LR", "MOUSE RIGHT", "RIGHT STICK"},
  {99, "INPUT_VEH_SELECT_NEXT_WEAPON", "SCROLLWHEEL UP", "X"},
  {100, "INPUT_VEH_SELECT_PREV_WEAPON", "[", "(NONE)"},
  {101, "INPUT_VEH_ROOF", "H", "DPAD RIGHT"},
  {102, "INPUT_VEH_JUMP", "SPACEBAR", "RB"},
  {103, "INPUT_VEH_GRAPPLING_HOOK", "E", "DPAD RIGHT"},
  {104, "INPUT_VEH_SHUFFLE", "H", "DPAD RIGHT"},
  {105, "INPUT_VEH_DROP_PROJECTILE", "X", "A"},
  {106, "INPUT_VEH_MOUSE_CONTROL_OVERRIDE", "LEFT MOUSE BUTTON", "(NONE)"},
  {107, "INPUT_VEH_FLY_ROLL_LR", "NUMPAD 6", "LEFT STICK"},
  {108, "INPUT_VEH_FLY_ROLL_LEFT_ONLY", "NUMPAD 4", "LEFT STICK"},
  {109, "INPUT_VEH_FLY_ROLL_RIGHT_ONLY", "NUMPAD 6", "LEFT STICK"},
  {110, "INPUT_VEH_FLY_PITCH_UD", "NUMPAD 5", "LEFT STICK"},
  {111, "INPUT_VEH_FLY_PITCH_UP_ONLY", "NUMPAD 8", "LEFT STICK"},
  {112, "INPUT_VEH_FLY_PITCH_DOWN_ONLY", "NUMPAD 5", "LEFT STICK"},
  {113, "INPUT_VEH_FLY_UNDERCARRIAGE", "G", "L3"},
  {114, "INPUT_VEH_FLY_ATTACK", "RIGHT MOUSE BUTTON", "A"},
  {115, "INPUT_VEH_FLY_SELECT_NEXT_WEAPON", "SCROLLWHEEL UP", "DPAD LEFT"},
  {116, "INPUT_VEH_FLY_SELECT_PREV_WEAPON", "[", "(NONE)"},
  {117, "INPUT_VEH_FLY_SELECT_TARGET_LEFT", "NUMPAD 7", "LB"},
  {118, "INPUT_VEH_FLY_SELECT_TARGET_RIGHT", "NUMPAD 9", "RB"},
  {119, "INPUT_VEH_FLY_VERTICAL_FLIGHT_MODE", "E", "DPAD RIGHT"},
  {120, "INPUT_VEH_FLY_DUCK", "X", "A"},
  {121, "INPUT_VEH_FLY_ATTACK_CAMERA", "INSERT", "R3"},
  {122, "INPUT_VEH_FLY_MOUSE_CONTROL_OVERRIDE", "LEFT MOUSE BUTTON", "(NONE)"},
  {123, "INPUT_VEH_SUB_TURN_LR", "NUMPAD 6", "LEFT STICK"},
  {124, "INPUT_VEH_SUB_TURN_LEFT_ONLY", "NUMPAD 4", "LEFT STICK"},
  {125, "INPUT_VEH_SUB_TURN_RIGHT_ONLY", "NUMPAD 6", "LEFT STICK"},
  {126, "INPUT_VEH_SUB_PITCH_UD", "NUMPAD 5", "LEFT STICK"},
  {127, "INPUT_VEH_SUB_PITCH_UP_ONLY", "NUMPAD 8", "LEFT STICK"},
  {128, "INPUT_VEH_SUB_PITCH_DOWN_ONLY", "NUMPAD 5", "LEFT STICK"},
  {129, "INPUT_VEH_SUB_THROTTLE_UP", "W", "RT"},
  {130, "INPUT_VEH_SUB_THROTTLE_DOWN", "S", "LT"},
  {131, "INPUT_VEH_SUB_ASCEND", "LEFT SHIFT", "X"},
  {132, "INPUT_VEH_SUB_DESCEND", "LEFT CTRL", "A"},
  {133, "INPUT_VEH_SUB_TURN_HARD_LEFT", "A", "LB"},
  {134, "INPUT_VEH_SUB_TURN_HARD_RIGHT", "D", "RB"},
  {135, "INPUT_VEH_SUB_MOUSE_CONTROL_OVERRIDE", "LEFT MOUSE BUTTON", "(NONE)"},
  {136, "INPUT_VEH_PUSHBIKE_PEDAL", "W", "A"},
  {137, "INPUT_VEH_PUSHBIKE_SPRINT", "CAPSLOCK", "A"},
  {138, "INPUT_VEH_PUSHBIKE_FRONT_BRAKE", "Q", "LT"},
  {139, "INPUT_VEH_PUSHBIKE_REAR_BRAKE", "S", "RT"},
  {140, "INPUT_MELEE_ATTACK_LIGHT", "R", "B"},
  {141, "INPUT_MELEE_ATTACK_HEAVY", "Q", "A"},
  {142, "INPUT_MELEE_ATTACK_ALTERNATE", "LEFT MOUSE BUTTON", "RT"},
  {143, "INPUT_MELEE_BLOCK", "SPACEBAR", "X"},
  {144, "INPUT_PARACHUTE_DEPLOY", "F / LEFT MOUSE BUTTON", "Y"},
  {145, "INPUT_PARACHUTE_DETACH", "F", "Y"},
  {146, "INPUT_PARACHUTE_TURN_LR", "D", "LEFT STICK"},
  {147, "INPUT_PARACHUTE_TURN_LEFT_ONLY", "A", "LEFT STICK"},
  {148, "INPUT_PARACHUTE_TURN_RIGHT_ONLY", "D", "LEFT STICK"},
  {149, "INPUT_PARACHUTE_PITCH_UD", "S", "LEFT STICK"},
  {150, "INPUT_PARACHUTE_PITCH_UP_ONLY", "W", "LEFT STICK"},
  {151, "INPUT_PARACHUTE_PITCH_DOWN_ONLY", "S", "LEFT STICK"},
  {152, "INPUT_PARACHUTE_BRAKE_LEFT", "Q", "LB"},
  {153, "INPUT_PARACHUTE_BRAKE_RIGHT", "E", "RB"},
  {154, "INPUT_PARACHUTE_SMOKE", "X", "A"},
  {155, "INPUT_PARACHUTE_PRECISION_LANDING", "LEFT SHIFT", "(NONE)"},
  {156, "INPUT_MAP", "(NONE)", "(NONE)"},
  {157, "INPUT_SELECT_WEAPON_UNARMED", "1", "(NONE)"},
  {158, "INPUT_SELECT_WEAPON_MELEE", "2", "(NONE)"},
  {159, "INPUT_SELECT_WEAPON_HANDGUN", "6", "(NONE)"},
  {160, "INPUT_SELECT_WEAPON_SHOTGUN", "3", "(NONE)"},
  {161, "INPUT_SELECT_WEAPON_SMG", "7", "(NONE)"},
  {162, "INPUT_SELECT_WEAPON_AUTO_RIFLE", "8", "(NONE)"},
  {163, "INPUT_SELECT_WEAPON_SNIPER", "9", "(NONE)"},
  {164, "INPUT_SELECT_WEAPON_HEAVY", "4", "(NONE)"},
  {165, "INPUT_SELECT_WEAPON_SPECIAL", "5", "(NONE)"},
  {166, "INPUT_SELECT_CHARACTER_MICHAEL", "F5", "(NONE)"},
  {167, "INPUT_SELECT_CHARACTER_FRANKLIN", "F6", "(NONE)"},
  {168, "INPUT_SELECT_CHARACTER_TREVOR", "F7", "(NONE)"},
  {169, "INPUT_SELECT_CHARACTER_MULTIPLAYER", "F8 (CONSOLE)", "(NONE)"},
  {170, "INPUT_SAVE_REPLAY_CLIP", "F3", "B"},
  {171, "INPUT_SPECIAL_ABILITY_PC", "CAPSLOCK", "(NONE)"},
  {172, "INPUT_CELLPHONE_UP", "ARROW UP", "DPAD UP"},
  {173, "INPUT_CELLPHONE_DOWN", "ARROW DOWN", "DPAD DOWN"},
  {174, "INPUT_CELLPHONE_LEFT", "ARROW LEFT", "DPAD LEFT"},
  {175, "INPUT_CELLPHONE_RIGHT", "ARROW RIGHT", "DPAD RIGHT"},
  {176, "INPUT_CELLPHONE_SELECT", "ENTER / LEFT MOUSE BUTTON", "A"},
  {177, "INPUT_CELLPHONE_CANCEL", "BACKSPACE / ESC / RIGHT MOUSE BUTTON", "B"},
  {178, "INPUT_CELLPHONE_OPTION", "DELETE", "Y"},
  {179, "INPUT_CELLPHONE_EXTRA_OPTION", "SPACEBAR", "X"},
  {180, "INPUT_CELLPHONE_SCROLL_FORWARD", "SCROLLWHEEL DOWN", "(NONE)"},
  {181, "INPUT_CELLPHONE_SCROLL_BACKWARD", "SCROLLWHEEL UP", "(NONE)"},
  {182, "INPUT_CELLPHONE_CAMERA_FOCUS_LOCK", "L", "RT"},
  {183, "INPUT_CELLPHONE_CAMERA_GRID", "G", "RB"},
  {184, "INPUT_CELLPHONE_CAMERA_SELFIE", "E", "R3"},
  {185, "INPUT_CELLPHONE_CAMERA_DOF", "F", "LB"},
  {186, "INPUT_CELLPHONE_CAMERA_EXPRESSION", "X", "L3"},
  {187, "INPUT_FRONTEND_DOWN", "ARROW DOWN", "DPAD DOWN"},
  {188, "INPUT_FRONTEND_UP", "ARROW UP", "DPAD UP"},
  {189, "INPUT_FRONTEND_LEFT", "ARROW LEFT", "DPAD LEFT"},
  {190, "INPUT_FRONTEND_RIGHT", "ARROW RIGHT", "DPAD RIGHT"},
  {191, "INPUT_FRONTEND_RDOWN", "ENTER", "A"},
  {192, "INPUT_FRONTEND_RUP", "TAB", "Y"},
  {193, "INPUT_FRONTEND_RLEFT", "(NONE)", "X"},
  {194, "INPUT_FRONTEND_RRIGHT", "BACKSPACE", "B"},
  {195, "INPUT_FRONTEND_AXIS_X", "D", "LEFT STICK"},
  {196, "INPUT_FRONTEND_AXIS_Y", "S", "LEFT STICK"},
  {197, "INPUT_FRONTEND_RIGHT_AXIS_X", "]", "RIGHT STICK"},
  {198, "INPUT_FRONTEND_RIGHT_AXIS_Y", "SCROLLWHEEL DOWN", "RIGHT STICK"},
  {199, "INPUT_FRONTEND_PAUSE", "P", "START"},
  {200, "INPUT_FRONTEND_PAUSE_ALTERNATE", "ESC", "(NONE)"},
  {201, "INPUT_FRONTEND_ACCEPT", "ENTER / NUMPAD ENTER", "A"},
  {202, "INPUT_FRONTEND_CANCEL", "BACKSPACE / ESC", "B"},
  {203, "INPUT_FRONTEND_X", "SPACEBAR", "X"},
  {204, "INPUT_FRONTEND_Y", "TAB", "Y"},
  {205, "INPUT_FRONTEND_LB", "Q", "LB"},
  {206, "INPUT_FRONTEND_RB", "E", "RB"},
  {207, "INPUT_FRONTEND_LT", "PAGE DOWN", "LT"},
  {208, "INPUT_FRONTEND_RT", "PAGE UP", "RT"},
  {209, "INPUT_FRONTEND_LS", "LEFT SHIFT", "L3"},
  {210, "INPUT_FRONTEND_RS", "LEFT CONTROL", "R3"},
  {211, "INPUT_FRONTEND_LEADERBOARD", "TAB", "RB"},
  {212, "INPUT_FRONTEND_SOCIAL_CLUB", "HOME", "BACK"},
  {213, "INPUT_FRONTEND_SOCIAL_CLUB_SECONDARY", "HOME", "RB"},
  {214, "INPUT_FRONTEND_DELETE", "DELETE", "X"},
  {215, "INPUT_FRONTEND_ENDSCREEN_ACCEPT", "ENTER", "A"},
  {216, "INPUT_FRONTEND_ENDSCREEN_EXPAND", "SPACEBAR", "X"},
  {217, "INPUT_FRONTEND_SELECT", "CAPSLOCK", "BACK"},
  {218, "INPUT_SCRIPT_LEFT_AXIS_X", "D", "LEFT STICK"},
  {219, "INPUT_SCRIPT_LEFT_AXIS_Y", "S", "LEFT STICK"},
  {220, "INPUT_SCRIPT_RIGHT_AXIS_X", "MOUSE RIGHT", "RIGHT STICK"},
  {221, "INPUT_SCRIPT_RIGHT_AXIS_Y", "MOUSE DOWN", "RIGHT STICK"},
  {222, "INPUT_SCRIPT_RUP", "RIGHT MOUSE BUTTON", "Y"},
  {223, "INPUT_SCRIPT_RDOWN", "LEFT MOUSE BUTTON", "A"},
  {224, "INPUT_SCRIPT_RLEFT", "LEFT CTRL", "X"},
  {225, "INPUT_SCRIPT_RRIGHT", "RIGHT MOUSE BUTTON", "B"},
  {226, "INPUT_SCRIPT_LB", "(NONE)", "LB"},
  {227, "INPUT_SCRIPT_RB", "(NONE)", "RB"},
  {228, "INPUT_SCRIPT_LT", "(NONE)", "LT"},
  {229, "INPUT_SCRIPT_RT", "LEFT MOUSE BUTTON", "RT"},
  {230, "INPUT_SCRIPT_LS", "(NONE)", "L3"},
  {231, "INPUT_SCRIPT_RS", "(NONE)", "R3"},
  {232, "INPUT_SCRIPT_PAD_UP", "W", "DPAD UP"},
  {233, "INPUT_SCRIPT_PAD_DOWN", "S", "DPAD DOWN"},
  {234, "INPUT_SCRIPT_PAD_LEFT", "A", "DPAD LEFT"},
  {235, "INPUT_SCRIPT_PAD_RIGHT", "D", "DPAD RIGHT"},
  {236, "INPUT_SCRIPT_SELECT", "V", "BACK"},
  {237, "INPUT_CURSOR_ACCEPT", "LEFT MOUSE BUTTON", "(NONE)"},
  {238, "INPUT_CURSOR_CANCEL", "RIGHT MOUSE BUTTON", "(NONE)"},
  {239, "INPUT_CURSOR_X", "(NONE)", "(NONE)"},
  {240, "INPUT_CURSOR_Y", "(NONE)", "(NONE)"},
  {241, "INPUT_CURSOR_SCROLL_UP", "SCROLLWHEEL UP", "(NONE)"},
  {242, "INPUT_CURSOR_SCROLL_DOWN", "SCROLLWHEEL DOWN", "(NONE)"},
  {243, "INPUT_ENTER_CHEAT_CODE", "~ / ", "(NONE)"},
  {244, "INPUT_INTERACTION_MENU", "M", "BACK"},
  {245, "INPUT_MP_TEXT_CHAT_ALL", "T", "(NONE)"},
  {246, "INPUT_MP_TEXT_CHAT_TEAM", "Y", "(NONE)"},
  {247, "INPUT_MP_TEXT_CHAT_FRIENDS", "(NONE)", "(NONE)"},
  {248, "INPUT_MP_TEXT_CHAT_CREW", "(NONE)", "(NONE)"},
  {249, "INPUT_PUSH_TO_TALK", "N", "(NONE)"},
  {250, "INPUT_CREATOR_LS", "R", "L3"},
  {251, "INPUT_CREATOR_RS", "F", "R3"},
  {252, "INPUT_CREATOR_LT", "X", "LT"},
  {253, "INPUT_CREATOR_RT", "C", "RT"},
  {254, "INPUT_CREATOR_MENU_TOGGLE", "LEFT SHIFT", "(NONE)"},
  {255, "INPUT_CREATOR_ACCEPT", "SPACEBAR", "A"},
  {256, "INPUT_CREATOR_DELETE", "DELETE", "X"},
  {257, "INPUT_ATTACK2", "LEFT MOUSE BUTTON", "RT"},
  {258, "INPUT_RAPPEL_JUMP", "(NONE)", "A"},
  {259, "INPUT_RAPPEL_LONG_JUMP", "(NONE)", "X"},
  {260, "INPUT_RAPPEL_SMASH_WINDOW", "(NONE)", "RT"},
  {261, "INPUT_PREV_WEAPON", "SCROLLWHEEL UP", "DPAD LEFT"},
  {262, "INPUT_NEXT_WEAPON", "SCROLLWHEEL DOWN", "DPAD RIGHT"},
  {263, "INPUT_MELEE_ATTACK1", "R", "B"},
  {264, "INPUT_MELEE_ATTACK2", "Q", "A"},
  {265, "INPUT_WHISTLE", "(NONE)", "(NONE)"},
  {266, "INPUT_MOVE_LEFT", "A", "LEFT STICK"},
  {267, "INPUT_MOVE_RIGHT", "D", "LEFT STICK"},
  {268, "INPUT_MOVE_UP", "W", "LEFT STICK"},
  {269, "INPUT_MOVE_DOWN", "S", "LEFT STICK"},
  {270, "INPUT_TOGGLE_CELLPHONE", "ESC", "(NONE)"},
  {271, "INPUT_CELLPHONE_SHOOT", "F1", "RT"},
  {272, "INPUT_PHONE_LEFT", "A", "DPAD LEFT"},
  {273, "INPUT_PHONE_RIGHT", "D", "DPAD RIGHT"},
  {274, "INPUT_PHONE_UP", "W", "DPAD UP"},
  {275, "INPUT_PHONE_DOWN", "S", "DPAD DOWN"},
  {276, "INPUT_PHONE_CANCEL", "ESC", "B"},
  {277, "INPUT_PHONE_OPTION", "F", "Y"},
  {278, "INPUT_PHONE_SELECT", "SPACEBAR", "A"},
  {279, "INPUT_PHONE_ANSWER", "E", "Y"},
  {280, "INPUT_PHONE_HANG_UP", "Q", "B"},
  {281, "INPUT_CELLPHONE_JUMP", "E", "(NONE)"},
  {282, "INPUT_CELLPHONE_LAND", "SPACEBAR", "(NONE)"},
  {283, "INPUT_CELLPHONE_PICK_UP", "E", "(NONE)"},
  {284, "INPUT_CELLPHONE_TALK", "E", "(NONE)"},
  {285, "INPUT_CELLPHONE_REJECT", "ESC", "(NONE)"},
  {286, "INPUT_CELLPHONE_UP", "W", "(NONE)"},
  {287, "INPUT_CELLPHONE_DOWN", "S", "(NONE)"},
  {288, "INPUT_CELLPHONE_LEFT", "A", "(NONE)"},
  {289, "INPUT_CELLPHONE_RIGHT", "D", "(NONE)"},
  {290, "INPUT_CELLPHONE_SCROLL_UP", "ARROW UP", "(NONE)"},
  {291, "INPUT_CELLPHONE_SCROLL_DOWN", "ARROW DOWN", "(NONE)"},
  {292, "INPUT_CELLPHONE_ZOOM_IN", "Q", "(NONE)"},
  {293, "INPUT_CELLPHONE_ZOOM_OUT", "E", "(NONE)"},
  {294, "INPUT_CELLPHONE_LOCK", "TAB", "(NONE)"},
  {295, "INPUT_CELLPHONE_CANCEL", "ESC", "(NONE)"},
  {296, "INPUT_CELLPHONE_ACCEPT", "SPACEBAR", "(NONE)"},
  {297, "INPUT_CELLPHONE_SELECT", "ENTER", "(NONE)"},
  {298, "INPUT_CELLPHONE_BACK", "BACKSPACE", "(NONE)"},
  {299, "INPUT_REPLAY_REWIND", "(NONE)", "(NONE)"},
  {300, "INPUT_REPLAY_FFWD", "ARROW UP", "RB"},
  {301, "INPUT_REPLAY_NEWMARKER", "M", "A"},
  {302, "INPUT_REPLAY_RECORD", "S", "(NONE)"},
  {303, "INPUT_REPLAY_SCREENSHOT", "U", "DPAD UP"},
  {304, "INPUT_REPLAY_HIDEHUD", "H", "R3"},
  {305, "INPUT_REPLAY_STARTPOINT", "B", "(NONE)"},
  {306, "INPUT_REPLAY_ENDPOINT", "N", "(NONE)"},
  {307, "INPUT_REPLAY_ADVANCE", "ARROW RIGHT", "DPAD RIGHT"},
  {308, "INPUT_REPLAY_BACK", "ARROW LEFT", "DPAD LEFT"},
  {309, "INPUT_REPLAY_TOOLS", "T", "DPAD DOWN"},
  {310, "INPUT_REPLAY_RESTART", "R", "BACK"},
  {311, "INPUT_REPLAY_SHOWHOTKEY", "K", "DPAD DOWN"},
  {312, "INPUT_REPLAY_CYCLEMARKERLEFT", "[", "DPAD LEFT"},
  {313, "INPUT_REPLAY_CYCLEMARKERRIGHT", "]", "DPAD RIGHT"},
  {314, "INPUT_REPLAY_FOVINCREASE", "NUMPAD +", "RB"},
  {315, "INPUT_REPLAY_FOVDECREASE", "NUMPAD -", "LB"},
  {316, "INPUT_REPLAY_CAMERAUP", "PAGE UP", "(NONE)"},
  {317, "INPUT_REPLAY_CAMERADOWN", "PAGE DOWN", "(NONE)"},
  {318, "INPUT_REPLAY_SAVE", "F5", "START"},
  {319, "INPUT_REPLAY_TOGGLETIME", "C", "(NONE)"},
  {320, "INPUT_REPLAY_TOGGLETIPS", "V", "(NONE)"},
  {321, "INPUT_REPLAY_PREVIEW", "SPACEBAR", "(NONE)"},
  {322, "INPUT_REPLAY_TOGGLE_TIMELINE", "ESC", "(NONE)"},
  {323, "INPUT_REPLAY_TIMELINE_PICKUP_CLIP", "X", "(NONE)"},
  {324, "INPUT_REPLAY_TIMELINE_DUPLICATE_CLIP", "C", "(NONE)"},
  {325, "INPUT_REPLAY_TIMELINE_PLACE_CLIP", "V", "(NONE)"},
  {326, "INPUT_REPLAY_CTRL", "LEFT CTRL", "(NONE)"},
  {327, "INPUT_REPLAY_TIMELINE_SAVE", "F5", "(NONE)"},
  {328, "INPUT_REPLAY_PREVIEW_AUDIO", "SPACEBAR", "RT"},
  {329, "INPUT_VEH_DRIVE_LOOK", "LEFT MOUSE BUTTON", "(NONE)"},
  {330, "INPUT_VEH_DRIVE_LOOK2", "RIGHT MOUSE BUTTON", "(NONE)"},
  {331, "INPUT_VEH_FLY_ATTACK2", "RIGHT MOUSE BUTTON", "(NONE)"},
  {332, "INPUT_RADIO_WHEEL_UD", "MOUSE DOWN", "RIGHT STICK"},
  {333, "INPUT_RADIO_WHEEL_LR", "MOUSE RIGHT", "RIGHT STICK"},
  {334, "INPUT_VEH_SLOWMO_UD", "SCROLLWHEEL DOWN", "LEFT STICK"},
  {335, "INPUT_VEH_SLOWMO_UP_ONLY", "SCROLLWHEEL UP", "LEFT STICK"},
  {336, "INPUT_VEH_SLOWMO_DOWN_ONLY", "SCROLLWHEEL DOWN", "LEFT STICK"},
  {337, "INPUT_VEH_HYDRAULICS_CONTROL_TOGGLE", "X", "A"},
  {338, "INPUT_VEH_HYDRAULICS_CONTROL_LEFT", "A", "LEFT STICK"},
  {339, "INPUT_VEH_HYDRAULICS_CONTROL_RIGHT", "D", "LEFT STICK"},
  {340, "INPUT_VEH_HYDRAULICS_CONTROL_UP", "LEFT SHIFT", "LEFT STICK"},
  {341, "INPUT_VEH_HYDRAULICS_CONTROL_DOWN", "LEFT CTRL", "LEFT STICK"},
  {342, "INPUT_VEH_HYDRAULICS_CONTROL_UD", "D", "LEFT STICK"},
  {343, "INPUT_VEH_HYDRAULICS_CONTROL_LR", "LEFT CTRL", "LEFT STICK"},
  {344, "INPUT_SWITCH_VISOR", "F11", "DPAD RIGHT"},
  {345, "INPUT_VEH_MELEE_HOLD", "X", "A"},
  {346, "INPUT_VEH_MELEE_LEFT", "LEFT MOUSE BUTTON", "LB"},
  {347, "INPUT_VEH_MELEE_RIGHT", "RIGHT MOUSE BUTTON", "RB"},
  {348, "INPUT_MAP_POI", "SCROLLWHEEL BUTTON (PRESS)", "Y"},
  {349, "INPUT_REPLAY_SNAPMATIC_PHOTO", "TAB", "X"},
  {350, "INPUT_VEH_CAR_JUMP", "E", "L3"},
  {351, "INPUT_VEH_ROCKET_BOOST", "E", "L3"},
  {352, "INPUT_VEH_FLY_BOOST", "LEFT SHIFT", "L3"},
  {353, "INPUT_VEH_PARACHUTE", "SPACEBAR", "A"},
  {354, "INPUT_VEH_BIKE_WINGS", "X", "A"},
  {355, "INPUT_VEH_FLY_BOMB_BAY", "E", "DPAD RIGHT"},
  {356, "INPUT_VEH_FLY_COUNTER", "E", "DPAD RIGHT"},
  {357, "INPUT_VEH_TRANSFORM", "X", "A"},
  {358, "INPUT_QUAD_LOCO_REVERSE", "(NONE)", "RB"},
  {359, "INPUT_RESPAWN_FASTER", "(NONE)", "(NONE)"},
  {360, "INPUT_HUDMARKER_SELECT", "(NONE)", "(NONE)"}
}

---@param _type 'index' | 'name' | 'qwerty' | 'xbox' 

function lib.getKey(index)
  local found = nil
  for _, mapping in ipairs(input_mappings) do
    if mapping[1] == index or tostring(string.upper(mapping[3])) == tostring(string.upper(index)) then 
      found = mapping
      break
    end
  end
  if not found then
    return nil
  end
  return {
    control = found[1],
    name = found[2],
    qwerty = found[3],
    xbox = found[4]
  }
end 

