The Pedigree Project
0.1
|
#include <HidInputManager.h>
Classes | |
struct | KeyState |
Public Member Functions | |
HidInputManager () | |
Default constructor. | |
virtual | ~HidInputManager () |
Default destructor. | |
void | keyDown (uint8_t keyCode) |
Called when a key transitions to the "down" state. | |
void | keyUp (uint8_t keyCode) |
Called when a key transitions to the "up" state. | |
void | updateKeys () |
Apply modifier or keymap changes to all keys in down state. | |
void | timer (uint64_t delta, InterruptState &state) |
Static Public Member Functions | |
static HidInputManager & | instance () |
Singleton design. | |
Private Attributes | |
Tree< uint8_t, KeyState * > | m_KeyStates |
Current key states (for periodic callbacks while a key is down) | |
Spinlock | m_KeyLock |
Static Private Attributes | |
static HidInputManager | m_Instance |
Static instance. | |
Global manager for all input from HID devices.
Definition at line 33 of file HidInputManager.h.
|
virtual |
Timer callback to handle repeating key press states when a key is held in the down state.
Implements TimerHandler.
Definition at line 105 of file HidInputManager.cc.
References Machine::getTimer(), InputManager::instance(), HidInputManager::KeyState::key, InputManager::keyPressed(), m_KeyLock, m_KeyStates, and HidInputManager::KeyState::nLeftTicks.
|
private |
Spinlock for work on keys.
Definition at line 83 of file HidInputManager.h.
Referenced by keyDown(), keyUp(), timer(), and updateKeys().