18#ifndef INCLUDED_HOTKEY
19#define INCLUDED_HOTKEY
37#include <unordered_map>
74extern std::unordered_map<SDL_Scancode_, KeyMapping>
g_HotkeyMap;
bool HotkeyIsPressed(const CStr &keyname)
Definition: Hotkey.cpp:478
bool EventWillFireHotkey(const SDL_Event_ *ev, const CStr &keyname)
Definition: Hotkey.cpp:453
const uint SDL_HOTKEYPRESS_SILENT
Definition: Hotkey.h:49
void LoadHotkeys(CConfigDB &configDB)
Definition: Hotkey.cpp:135
constexpr SDL_Scancode_ UNUSED_HOTKEY_CODE
Definition: Hotkey.h:52
int SDL_Scancode_
Definition: Hotkey.h:41
void UnloadHotkeys()
Definition: Hotkey.cpp:141
const uint SDL_HOTKEYUP
Definition: Hotkey.h:48
const uint SDL_HOTKEYDOWN
Definition: Hotkey.h:47
std::unordered_map< SDL_Scancode_, KeyMapping > g_HotkeyMap
Definition: Hotkey.cpp:33
InReaction HotkeyStateChange(const SDL_Event_ *ev)
Updates g_HotkeyMap.
Definition: Hotkey.cpp:164
InReaction HotkeyInputActualHandler(const SDL_Event_ *ev)
Actually fires hotkeys.
Definition: Hotkey.cpp:349
const uint SDL_HOTKEYPRESS
Definition: Hotkey.h:46
const uint SDL_USEREVENT_
Definition: Hotkey.h:45
const uint SDL_HOTKEYUP_SILENT
Definition: Hotkey.h:50
void ResetActiveHotkeys()
Resets all currently active hotkeys (and clears in-flight hotkeys).
Definition: Hotkey.cpp:463
std::vector< SHotkeyMapping > KeyMapping
Definition: Hotkey.h:69
InReaction HotkeyInputPrepHandler(const SDL_Event_ *ev)
Detects hotkeys that should fire.
Definition: Hotkey.cpp:173
Definition: ConfigDB.h:67
SKey primary
Definition: Hotkey.h:65
std::vector< SKey > required
Definition: Hotkey.h:66
CStr name
Definition: Hotkey.h:64
bool operator==(const SKey &o) const
Definition: Hotkey.h:58
SDL_Scancode_ code
Definition: Hotkey.h:56
bool operator<(const SKey &o) const
Definition: Hotkey.h:57
unsigned int uint
Definition: types.h:42