7#include "type/spk_input_state.hpp"
102 NumpadMultiply = 106,
104 NumpadSeparator = 108,
158 static inline const size_t NbKey = 255;
163 std::array<InputState, NbKey>
keys;
171 for (
auto &state :
keys)
173 state = InputState::Up;
184 return keys[
static_cast<size_t>(p_key)];
194 return keys[
static_cast<size_t>(p_key)];
201 std::ostream &operator<<(std::ostream &p_stream,
const Keyboard::Key &p_key);
202 std::wostream &operator<<(std::wostream &p_stream,
const Keyboard::Key &p_key);
static const size_t NbKey
Number of key codes defined in the enumeration.
Definition spk_keyboard.hpp:158
const InputState & operator[](const Key p_key) const
Accesses the state of a key.
Definition spk_keyboard.hpp:192
Key
Enumeration of supported keyboard keys using platform scan codes.
Definition spk_keyboard.hpp:21
wchar_t glyph
Last received glyph (for text input).
Definition spk_keyboard.hpp:167
InputState & operator[](const Key p_key)
Accesses the state of a key.
Definition spk_keyboard.hpp:182
std::array< InputState, NbKey > keys
State of each key, indexed by Key code.
Definition spk_keyboard.hpp:163