44 bool isKeyUp(Keys key)
const override;
49 const std::unordered_map<graphic::IKeyboard::Keys, SDL_Scancode> _keys = {
51 {graphic::IKeyboard::Keys::KEY_ESCAPE, SDL_SCANCODE_ESCAPE},
52 {graphic::IKeyboard::Keys::KEY_F1, SDL_SCANCODE_F1},
53 {graphic::IKeyboard::Keys::KEY_F2, SDL_SCANCODE_F2},
54 {graphic::IKeyboard::Keys::KEY_F3, SDL_SCANCODE_F3},
55 {graphic::IKeyboard::Keys::KEY_F4, SDL_SCANCODE_F4},
56 {graphic::IKeyboard::Keys::KEY_F5, SDL_SCANCODE_F5},
57 {graphic::IKeyboard::Keys::KEY_F6, SDL_SCANCODE_F6},
58 {graphic::IKeyboard::Keys::KEY_F7, SDL_SCANCODE_F7},
59 {graphic::IKeyboard::Keys::KEY_F8, SDL_SCANCODE_F8},
60 {graphic::IKeyboard::Keys::KEY_F9, SDL_SCANCODE_F9},
61 {graphic::IKeyboard::Keys::KEY_F10, SDL_SCANCODE_F10},
62 {graphic::IKeyboard::Keys::KEY_F11, SDL_SCANCODE_F11},
63 {graphic::IKeyboard::Keys::KEY_F12, SDL_SCANCODE_F12},
65 {graphic::IKeyboard::Keys::KEY_1, SDL_SCANCODE_1},
66 {graphic::IKeyboard::Keys::KEY_2, SDL_SCANCODE_2},
67 {graphic::IKeyboard::Keys::KEY_3, SDL_SCANCODE_3},
68 {graphic::IKeyboard::Keys::KEY_4, SDL_SCANCODE_4},
69 {graphic::IKeyboard::Keys::KEY_5, SDL_SCANCODE_5},
70 {graphic::IKeyboard::Keys::KEY_6, SDL_SCANCODE_6},
71 {graphic::IKeyboard::Keys::KEY_7, SDL_SCANCODE_7},
72 {graphic::IKeyboard::Keys::KEY_8, SDL_SCANCODE_8},
73 {graphic::IKeyboard::Keys::KEY_9, SDL_SCANCODE_9},
74 {graphic::IKeyboard::Keys::KEY_0, SDL_SCANCODE_0},
75 {graphic::IKeyboard::Keys::KEY_MINUS, SDL_SCANCODE_MINUS},
76 {graphic::IKeyboard::Keys::KEY_EQUAL, SDL_SCANCODE_EQUALS},
77 {graphic::IKeyboard::Keys::KEY_BACKSPACE, SDL_SCANCODE_BACKSPACE},
79 {graphic::IKeyboard::Keys::KEY_TAB, SDL_SCANCODE_TAB},
80 {graphic::IKeyboard::Keys::KEY_Q, SDL_SCANCODE_Q},
81 {graphic::IKeyboard::Keys::KEY_W, SDL_SCANCODE_W},
82 {graphic::IKeyboard::Keys::KEY_E, SDL_SCANCODE_E},
83 {graphic::IKeyboard::Keys::KEY_R, SDL_SCANCODE_R},
84 {graphic::IKeyboard::Keys::KEY_T, SDL_SCANCODE_T},
85 {graphic::IKeyboard::Keys::KEY_Y, SDL_SCANCODE_Y},
86 {graphic::IKeyboard::Keys::KEY_U, SDL_SCANCODE_U},
87 {graphic::IKeyboard::Keys::KEY_I, SDL_SCANCODE_I},
88 {graphic::IKeyboard::Keys::KEY_O, SDL_SCANCODE_O},
89 {graphic::IKeyboard::Keys::KEY_P, SDL_SCANCODE_P},
90 {graphic::IKeyboard::Keys::KEY_LEFT_BRACKET, SDL_SCANCODE_LEFTBRACKET},
91 {graphic::IKeyboard::Keys::KEY_RIGHT_BRACKET, SDL_SCANCODE_RIGHTBRACKET},
93 {graphic::IKeyboard::Keys::KEY_CAPS_LOCK, SDL_SCANCODE_CAPSLOCK},
94 {graphic::IKeyboard::Keys::KEY_LEFT_CONTROL, SDL_SCANCODE_LCTRL},
95 {graphic::IKeyboard::Keys::KEY_A, SDL_SCANCODE_A},
96 {graphic::IKeyboard::Keys::KEY_S, SDL_SCANCODE_S},
97 {graphic::IKeyboard::Keys::KEY_D, SDL_SCANCODE_D},
98 {graphic::IKeyboard::Keys::KEY_F, SDL_SCANCODE_F},
99 {graphic::IKeyboard::Keys::KEY_G, SDL_SCANCODE_G},
100 {graphic::IKeyboard::Keys::KEY_H, SDL_SCANCODE_H},
101 {graphic::IKeyboard::Keys::KEY_J, SDL_SCANCODE_J},
102 {graphic::IKeyboard::Keys::KEY_K, SDL_SCANCODE_K},
103 {graphic::IKeyboard::Keys::KEY_L, SDL_SCANCODE_L},
104 {graphic::IKeyboard::Keys::KEY_SEMICOLON, SDL_SCANCODE_SEMICOLON},
105 {graphic::IKeyboard::Keys::KEY_APOSTROPHE, SDL_SCANCODE_APOSTROPHE},
106 {graphic::IKeyboard::Keys::KEY_BACKTICK, SDL_SCANCODE_GRAVE},
107 {graphic::IKeyboard::Keys::KEY_ENTER, SDL_SCANCODE_RETURN},
109 {graphic::IKeyboard::Keys::KEY_LEFT_SHIFT, SDL_SCANCODE_LSHIFT},
110 {graphic::IKeyboard::Keys::KEY_BACKSLASH, SDL_SCANCODE_BACKSLASH},
111 {graphic::IKeyboard::Keys::KEY_Z, SDL_SCANCODE_Z},
112 {graphic::IKeyboard::Keys::KEY_X, SDL_SCANCODE_X},
113 {graphic::IKeyboard::Keys::KEY_C, SDL_SCANCODE_C},
114 {graphic::IKeyboard::Keys::KEY_V, SDL_SCANCODE_V},
115 {graphic::IKeyboard::Keys::KEY_B, SDL_SCANCODE_B},
116 {graphic::IKeyboard::Keys::KEY_N, SDL_SCANCODE_N},
117 {graphic::IKeyboard::Keys::KEY_M, SDL_SCANCODE_M},
118 {graphic::IKeyboard::Keys::KEY_COMMA, SDL_SCANCODE_COMMA},
119 {graphic::IKeyboard::Keys::KEY_PERIOD, SDL_SCANCODE_PERIOD},
120 {graphic::IKeyboard::Keys::KEY_SLASH, SDL_SCANCODE_SLASH},
121 {graphic::IKeyboard::Keys::KEY_RIGHT_SHIFT, SDL_SCANCODE_RSHIFT},
123 {graphic::IKeyboard::Keys::KEY_LEFT_ALT, SDL_SCANCODE_LALT},
124 {graphic::IKeyboard::Keys::KEY_LEFT_SUPER, SDL_SCANCODE_LGUI},
125 {graphic::IKeyboard::Keys::KEY_SPACE, SDL_SCANCODE_SPACE},
126 {graphic::IKeyboard::Keys::KEY_RIGHT_ALT, SDL_SCANCODE_RALT},
127 {graphic::IKeyboard::Keys::KEY_RIGHT_SUPER, SDL_SCANCODE_RGUI},
128 {graphic::IKeyboard::Keys::KEY_RIGHT_CONTROL, SDL_SCANCODE_RCTRL},
130 {graphic::IKeyboard::Keys::KEY_PAD_0, SDL_SCANCODE_KP_0},
131 {graphic::IKeyboard::Keys::KEY_PAD_1, SDL_SCANCODE_KP_1},
132 {graphic::IKeyboard::Keys::KEY_PAD_2, SDL_SCANCODE_KP_2},
133 {graphic::IKeyboard::Keys::KEY_PAD_3, SDL_SCANCODE_KP_3},
134 {graphic::IKeyboard::Keys::KEY_PAD_4, SDL_SCANCODE_KP_4},
135 {graphic::IKeyboard::Keys::KEY_PAD_5, SDL_SCANCODE_KP_5},
136 {graphic::IKeyboard::Keys::KEY_PAD_6, SDL_SCANCODE_KP_6},
137 {graphic::IKeyboard::Keys::KEY_PAD_7, SDL_SCANCODE_KP_7},
138 {graphic::IKeyboard::Keys::KEY_PAD_8, SDL_SCANCODE_KP_8},
139 {graphic::IKeyboard::Keys::KEY_PAD_9, SDL_SCANCODE_KP_9},
140 {graphic::IKeyboard::Keys::KEY_PAD_MINUS, SDL_SCANCODE_KP_MINUS},
141 {graphic::IKeyboard::Keys::KEY_PAD_PLUS, SDL_SCANCODE_KP_PLUS},
142 {graphic::IKeyboard::Keys::KEY_PAD_DOT, SDL_SCANCODE_KP_PERIOD},
143 {graphic::IKeyboard::Keys::KEY_PAD_ENTER, SDL_SCANCODE_KP_ENTER},
145 {graphic::IKeyboard::Keys::KEY_UP, SDL_SCANCODE_UP},
146 {graphic::IKeyboard::Keys::KEY_DOWN, SDL_SCANCODE_DOWN},
147 {graphic::IKeyboard::Keys::KEY_LEFT, SDL_SCANCODE_LEFT},
148 {graphic::IKeyboard::Keys::KEY_RIGHT, SDL_SCANCODE_RIGHT},