20 #ifndef MACHINE_KEYMAP_MANAGER_H 21 #define MACHINE_KEYMAP_MANAGER_H 23 #include "pedigree/kernel/Spinlock.h" 24 #include "pedigree/kernel/compiler.h" 25 #include "pedigree/kernel/processor/types.h" 26 #include "pedigree/kernel/utilities/Tree.h" 47 void useKeymap(uint8_t *pSparseTable, uint8_t *pDataTable);
50 bool useCompiledKeymap(uint32_t *pCompiledKeymap,
size_t keymapLength);
54 bool handleHidModifier(uint8_t keyCode,
bool bDown);
59 uint64_t resolveHidKeycode(uint8_t keyCode);
70 convertPc102ScancodeToHidKeycode(uint8_t scancode, EscapeState &escape);
85 bool bCtrl,
bool bShift,
bool bAlt,
bool bAltGr, uint8_t nCombinator,
106 HidRightShift = 0xE5,
uint64_t key
The resolved key.
static KeymapManager & instance()
Singleton design.
bool m_bCapsLock
True if caps lock is on.
static KeymapManager m_Instance
Static instance.
uint8_t m_nCombinator
Index of the current active combinator, if any.
uint64_t nLeftTicks
The time left until the next key repeat.
Structure representing an entry in the sparse table.
SparseEntry * m_pSparseTable
The sparse and data tables for the current keymap.
HidModifiers
HID keycodes corresponding to modifiers.
bool m_bLeftCtrl
State of the modifiers, true if down, false if up.
Tree< uint8_t, KeyState * > m_KeyStates
Current key states (for periodic callbacks while a key is down)
Structure representing an entry in the keymap table.