20 {ImGuiKey_Tab, SDLK_TAB},
21 {ImGuiKey_LeftArrow, SDLK_LEFT},
22 {ImGuiKey_RightArrow, SDLK_RIGHT},
23 {ImGuiKey_UpArrow, SDLK_UP},
24 {ImGuiKey_DownArrow, SDLK_DOWN},
25 {ImGuiKey_PageUp, SDLK_PAGEUP},
26 {ImGuiKey_PageDown, SDLK_PAGEDOWN},
27 {ImGuiKey_Home, SDLK_HOME},
28 {ImGuiKey_End, SDLK_END},
29 {ImGuiKey_Insert, SDLK_INSERT},
30 {ImGuiKey_Delete, SDLK_DELETE},
31 {ImGuiKey_Backspace, SDLK_BACKSPACE},
32 {ImGuiKey_Space, SDLK_SPACE},
33 {ImGuiKey_Enter, SDLK_RETURN},
34 {ImGuiKey_Escape, SDLK_ESCAPE},
35 {ImGuiKey_Apostrophe, SDLK_QUOTE},
36 {ImGuiKey_Comma, SDLK_COMMA},
37 {ImGuiKey_Minus, SDLK_MINUS},
38 {ImGuiKey_Period, SDLK_PERIOD},
39 {ImGuiKey_Slash, SDLK_SLASH},
40 {ImGuiKey_Semicolon, SDLK_SEMICOLON},
41 {ImGuiKey_Equal, SDLK_EQUALS},
42 {ImGuiKey_LeftBracket, SDLK_LEFTBRACKET},
43 {ImGuiKey_Backslash, SDLK_BACKSLASH},
44 {ImGuiKey_RightBracket, SDLK_RIGHTBRACKET},
45 {ImGuiKey_GraveAccent, SDLK_BACKQUOTE},
46 {ImGuiKey_CapsLock, SDLK_CAPSLOCK},
47 {ImGuiKey_ScrollLock, SDLK_SCROLLLOCK},
48 {ImGuiKey_NumLock, SDLK_NUMLOCKCLEAR},
49 {ImGuiKey_PrintScreen, SDLK_PRINTSCREEN},
50 {ImGuiKey_Pause, SDLK_PAUSE},
51 {ImGuiKey_Keypad0, SDLK_KP_0},
52 {ImGuiKey_Keypad1, SDLK_KP_1},
53 {ImGuiKey_Keypad2, SDLK_KP_2},
54 {ImGuiKey_Keypad3, SDLK_KP_3},
55 {ImGuiKey_Keypad4, SDLK_KP_4},
56 {ImGuiKey_Keypad5, SDLK_KP_5},
57 {ImGuiKey_Keypad6, SDLK_KP_6},
58 {ImGuiKey_Keypad7, SDLK_KP_7},
59 {ImGuiKey_Keypad8, SDLK_KP_8},
60 {ImGuiKey_Keypad9, SDLK_KP_9},
61 {ImGuiKey_KeypadDecimal, SDLK_KP_PERIOD},
62 {ImGuiKey_KeypadDivide, SDLK_KP_DIVIDE},
63 {ImGuiKey_KeypadMultiply, SDLK_KP_MULTIPLY},
64 {ImGuiKey_KeypadSubtract, SDLK_KP_MINUS},
65 {ImGuiKey_KeypadAdd, SDLK_KP_PLUS},
66 {ImGuiKey_KeypadEnter, SDLK_KP_ENTER},
67 {ImGuiKey_KeypadEqual, SDLK_KP_EQUALS},
68 {ImGuiKey_LeftCtrl, SDLK_LCTRL},
69 {ImGuiKey_LeftShift, SDLK_LSHIFT},
70 {ImGuiKey_LeftAlt, SDLK_LALT},
71 {ImGuiKey_LeftSuper, SDLK_LGUI},
72 {ImGuiKey_RightCtrl, SDLK_RCTRL},
73 {ImGuiKey_RightShift, SDLK_RSHIFT},
74 {ImGuiKey_RightAlt, SDLK_RALT},
75 {ImGuiKey_RightSuper, SDLK_RGUI},
76 {ImGuiKey_Menu, SDLK_APPLICATION},
100 {ImGuiKey_N, SDLK_n},
101 {ImGuiKey_O, SDLK_o},
102 {ImGuiKey_P, SDLK_p},
103 {ImGuiKey_Q, SDLK_q},
104 {ImGuiKey_R, SDLK_r},
105 {ImGuiKey_S, SDLK_s},
106 {ImGuiKey_T, SDLK_t},
107 {ImGuiKey_U, SDLK_u},
108 {ImGuiKey_V, SDLK_v},
109 {ImGuiKey_W, SDLK_w},
110 {ImGuiKey_X, SDLK_x},
111 {ImGuiKey_Y, SDLK_y},
112 {ImGuiKey_Z, SDLK_z},
113 {ImGuiKey_F1, SDLK_F1},
114 {ImGuiKey_F2, SDLK_F2},
115 {ImGuiKey_F3, SDLK_F3},
116 {ImGuiKey_F4, SDLK_F4},
117 {ImGuiKey_F5, SDLK_F5},
118 {ImGuiKey_F6, SDLK_F6},
119 {ImGuiKey_F7, SDLK_F7},
120 {ImGuiKey_F8, SDLK_F8},
121 {ImGuiKey_F9, SDLK_F9},
122 {ImGuiKey_F10, SDLK_F10},
123 {ImGuiKey_F11, SDLK_F11},
124 {ImGuiKey_F12, SDLK_F12},
125 {ImGuiKey_F13, SDLK_F13},
126 {ImGuiKey_F14, SDLK_F14},
127 {ImGuiKey_F15, SDLK_F15},
128 {ImGuiKey_F16, SDLK_F16},
129 {ImGuiKey_F17, SDLK_F17},
130 {ImGuiKey_F18, SDLK_F18},
131 {ImGuiKey_F19, SDLK_F19},
132 {ImGuiKey_F20, SDLK_F20},
133 {ImGuiKey_F21, SDLK_F21},
134 {ImGuiKey_F22, SDLK_F22},
135 {ImGuiKey_F23, SDLK_F23},
136 {ImGuiKey_F24, SDLK_F24},
137 {ImGuiKey_AppBack, SDLK_AC_BACK},
138 {ImGuiKey_AppForward, SDLK_AC_FORWARD},
144 static constexpr auto lookup = []{
150 return ((it !=
lookup.end()) && (it->imgui == imgui)) ? it->sdl : SDLK_UNKNOWN;
155 static constexpr auto lookup = []{
161 return ((it !=
lookup.end()) && (it->sdl == sdl)) ? it->imgui : ImGuiKey_None;
const Value * lookup(const hash_map< Key, Value, Hasher, Equal > &map, const Key2 &key)
This file implemented 3 utility functions:
constexpr auto unsortedKeys
ImGuiKey SDLKey2ImGui(SDL_Keycode sdl)
SDL_Keycode ImGuiKey2SDL(ImGuiKey imgui)
constexpr void sort(RandomAccessRange &&range)
auto lower_bound(ForwardRange &&range, const T &value, Compare comp={}, Proj proj={})