3#include <SDL3/SDL_events.h>
4#include <SDL3/SDL_init.h>
14 enum class EventType {
104 std::vector<Key> bindings;
105 std::function<void(
bool)> callback;
112 void processEvents();
113 void registerAction(
const std::string& actionName,
const std::vector<Key>& keys, std::function<
void(
bool)> callback,
const std::string& context);
115 void setActiveContext(
const std::string& context);
116 std::string getActiveContext()
const;
121 std::vector<InputAction*> getActionsByKey(
const Key key)
const;
123 SDL_AppResult handleEvent(SDL_EventType type, SDL_Event*
const event);
129 std::map<std::string, std::map<Key, std::vector<InputAction*>>> actionsByContextAndKey;
131 std::map<Key, SDL_Scancode> keyMap;
132 std::string activeContext;
135std::ostream& operator<<(std::ostream& os, InputManager::Key key);
138std::ostream& operator<<(std::ostream& os,
const std::vector<InputManager::InputAction>& actions);
139std::ostream& operator<<(std::ostream& os,
const std::vector<InputManager::InputAction*>& actions);