|
The Pedigree Project 0.1
|
#include <HidInputManager.h>
Inheritance diagram for HidInputManager:
Collaboration diagram for HidInputManager:Classes | |
| struct | KeyState |
Public Member Functions | |
| HidInputManager () | |
| Default constructor. | |
| virtual | ~HidInputManager () |
| Default destructor. | |
| void | keyDown (uint8_t keyCode, const void *source=nullptr) |
| Called when a key transitions to the "down" state. | |
| void | keyUp (uint8_t keyCode, const void *source=nullptr) |
| 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) |
Static Public Member Functions | |
| static HidInputManager & | instance () |
| Singleton design. | |
Private Member Functions | |
| void | armNextRepeatLocked () |
| void | updateKeysLocked () |
Private Attributes | |
| Tree< uint8_t, KeyState * > | m_KeyStates |
| Current key states (for periodic callbacks while a key is down) | |
| Spinlock | m_KeyLock |
| Timer * | m_pTimer |
| uint64_t | m_NextArmed |
Static Private Attributes | |
| static HidInputManager | m_Instance |
| Static instance. | |
Global manager for all input from HID devices.
Definition at line 36 of file HidInputManager.h.
| HidInputManager::HidInputManager | ( | ) |
Default constructor.
Definition at line 32 of file HidInputManager.cc.
|
virtual |
Default destructor.
Definition at line 34 of file HidInputManager.cc.
|
private |
Definition at line 145 of file HidInputManager.cc.
|
inlinestatic |
Singleton design.
Definition at line 45 of file HidInputManager.h.
Referenced by HidUtils::sendInputToManager(), KeymapManager::useCompiledKeymap(), and KeymapManager::useKeymap().
Here is the caller graph for this function:| void HidInputManager::keyDown | ( | uint8_t | keyCode, |
| const void * | source = nullptr |
||
| ) |
Called when a key transitions to the "down" state.
Definition at line 46 of file HidInputManager.cc.
References Machine::getTimer(), KeymapManager::handleHidModifier(), InputManager::instance(), KeymapManager::instance(), HidInputManager::KeyState::key, InputManager::keyPressed(), m_KeyLock, m_KeyStates, m_pTimer, HidInputManager::KeyState::nextRepeat, Vector< T >::pushBack(), InputManager::rawKeyUpdate(), KeymapManager::resolveHidKeycode(), HidInputManager::KeyState::sources, and timer().
Referenced by HidUtils::sendInputToManager().
Here is the caller graph for this function:| void HidInputManager::keyUp | ( | uint8_t | keyCode, |
| const void * | source = nullptr |
||
| ) |
Called when a key transitions to the "up" state.
Definition at line 92 of file HidInputManager.cc.
References Vector< T >::count(), Vector< T >::erase(), InputManager::instance(), KeymapManager::instance(), m_KeyLock, m_KeyStates, InputManager::rawKeyUpdate(), and HidInputManager::KeyState::sources.
Referenced by HidUtils::sendInputToManager().
Here is the caller graph for this function:
|
virtual |
Timer callback to handle repeating key press states when a key is held in the down state.
Implements TimerHandler.
Definition at line 118 of file HidInputManager.cc.
References InputManager::instance(), HidInputManager::KeyState::key, InputManager::keyPressed(), m_KeyLock, m_KeyStates, m_pTimer, HidInputManager::KeyState::nextRepeat, Timer::supportsDeadlines(), and timer().
Referenced by keyDown(), timer(), and ~HidInputManager().
Here is the caller graph for this function:| void HidInputManager::updateKeys | ( | ) |
Apply modifier or keymap changes to all keys in down state.
Definition at line 166 of file HidInputManager.cc.
References m_KeyLock.
Referenced by KeymapManager::useCompiledKeymap(), and KeymapManager::useKeymap().
Here is the caller graph for this function:
|
private |
Definition at line 171 of file HidInputManager.cc.
|
staticprivate |
Static instance.
Definition at line 64 of file HidInputManager.h.
|
private |
Spinlock for work on keys.
Definition at line 89 of file HidInputManager.h.
Referenced by keyDown(), keyUp(), timer(), updateKeys(), and ~HidInputManager().
Current key states (for periodic callbacks while a key is down)
Definition at line 83 of file HidInputManager.h.
|
private |
Definition at line 93 of file HidInputManager.h.
|
private |
Non-null only while key-repeat callbacks are admitted.
Definition at line 92 of file HidInputManager.h.
Referenced by keyDown(), timer(), and ~HidInputManager().