3 #include "win32/key_code.h" 6 #include "util/queue.h" void SetKeyModifiers(KeyCode key, int modifiers)
Changes the key modifiers of a key to true.
Definition: keyboard_state.cc:74
bool modifier_alt
Whether the alt-modifier was pressed together with this key.
Definition: keyboard_state.h:36
Queue< unsigned int > input_keys_
The keys that were pressed over the last frame, in correct order. These are stored in unicode ids...
Definition: keyboard_state.h:114
Implements all ImGui functionality.
Definition: imgui_manager.h:22
Class for creating windows.
Definition: window.h:30
bool GetKeyDown(KeyCode key)
Find out whether a key is down or not.
Definition: keyboard_state.cc:30
bool GetKey(KeyCode key)
Find out whether a key is down or not.
Definition: keyboard_state.cc:24
void SetKeyPressed(KeyCode key)
Changes the press-state of a key to true.
Definition: keyboard_state.cc:60
eastl::map< Key, T > Map
Typedef for wrapping the EASTL map.
Definition: map.h:14
bool GetKeyReleased(KeyCode key)
Find out whether a key is released or not.
Definition: keyboard_state.cc:42
bool released
Whether the key is currently released. (only true for 1 frame!)
Definition: keyboard_state.h:34
const KeyState & GetKeyState(KeyCode key)
Retrieves the full state of a key.
Definition: keyboard_state.cc:48
KeyCode
All keycodes.
Definition: key_code.h:12
Keeps track of the state of the keyboard.
Definition: keyboard_state.h:18
void AddInputKey(unsigned int key)
Adds an input key.
Definition: keyboard_state.cc:82
bool pressed
Whether the key is currently pressed. (only true for 1 frame!)
Definition: keyboard_state.h:33
void ResetKeys()
Resets all keys by changing their press & release states to false.
Definition: keyboard_state.cc:88
eastl::queue< T > Queue
Typedef for wrapping the EASTL queue.
Definition: queue.h:14
bool GetKeyPressed(KeyCode key)
Find out whether a key is pressed or not.
Definition: keyboard_state.cc:36
The main Blowbox namespace.
Definition: image.cc:8
Map< KeyCode, KeyState > key_states_
A map of KeyCodes to KeyStates.
Definition: keyboard_state.h:113
void SetKeyReleased(KeyCode key)
Changes the release-state of a key to true.
Definition: keyboard_state.cc:67
Queue< unsigned int > GetInputKeys() const
Definition: keyboard_state.cc:54
Manages all GLFW state such as global initialization / termination, event polling, etc.
Definition: glfw_manager.h:16
bool modifier_control
Whether the control-modifier was pressed together with this key.
Definition: keyboard_state.h:35
bool modifier_shift
Whether the shift-modifier was pressed together with this key.
Definition: keyboard_state.h:37
Keeps track of the state of a key on the keyboard.
Definition: keyboard_state.h:30
bool down
Whether the key is currently held down.
Definition: keyboard_state.h:32