KeyMap

AppCUI::Input::KeyMap (class)

class KeyMap

Small open-addressing table: key -> command id. Built when bindings change, queried once per key press.

Public Functions

KeyMap()
~KeyMap()
KeyMap(const KeyMap&) = delete
KeyMap &operator=(const KeyMap&) = delete
void Clear()
void Add(const KeyBinding &binding)

Ignores Key::None; when two bindings share a key, the first one wins.

template<typename Container>
inline void Build(const Container &bindings)
Result Resolve(Key keyCode) const

exact match first; then (if Shift is pressed) the same key without Shift for ShiftExtendsSelection bindings

Public Static Attributes

static constexpr uint32 NO_COMMAND = 0xFFFFFFFF
struct Result

Public Members

uint32 commandId
bool extendSelection