1 #ifndef TACOS_APP_KEYMAP_HPP
2 #define TACOS_APP_KEYMAP_HPP
31 static constexpr unsigned int MAX_SCANCODE = 0xFF;
32 static constexpr unsigned int NUM_SCANCODES = MAX_SCANCODE + 1;
37 void Map(SDL_Scancode scancode, Action);
38 Action Lookup(SDL_Scancode scancode) const;
39 Action Lookup(const SDL_Keysym &s) const { return Lookup(s.scancode); }
40 Action Lookup(const SDL_KeyboardEvent &e) const { return Lookup(e.keysym); }
45 Action codemap[NUM_SCANCODES];