3#include <SDL3/SDL_events.h>
4#include <SDL3/SDL_init.h>
106 std::vector<Key> bindings;
107 std::function<void(
bool)> callback;
114 void processEvents();
120 void registerAction(
const std::string& actionName,
const std::vector<Key>& keys, std::function<
void(
bool)> callback,
const std::string& context =
"Default");
132 std::vector<InputAction*> getActionsByKey(
const Key key)
const;
134 SDL_AppResult handleEvent(SDL_EventType type, SDL_Event*
const event);
140 std::map<std::string, std::map<Key, std::vector<InputAction*>>> actionsByContextAndKey;
142 std::map<Key, SDL_Scancode> keyMap;
143 std::string activeContext;
149std::ostream& operator<<(std::ostream& os,
const std::vector<InputManager::InputAction>& actions);
150std::ostream& operator<<(std::ostream& os,
const std::vector<InputManager::InputAction*>& actions);