#include <CMSWindowsKeyState.h>
Inherits CKeyState.
Inheritance diagram for CMSWindowsKeyState:
accessors | |
KeyButton | virtualKeyToButton (UINT virtualKey) const |
Map a virtual key to a button. | |
KeyID | mapKeyFromEvent (WPARAM charAndVirtKey, LPARAM info, KeyModifierMask *maskOut) const |
Map key event to a key. | |
bool | didGroupsChange () const |
Check if keyboard groups have changed. | |
UINT | mapKeyToVirtualKey (KeyID key) const |
Map key to virtual key. | |
KeyID | getKeyID (UINT virtualKey, KeyButton button) |
Map virtual key and button to KeyID. | |
Public Member Functions | |
CMSWindowsKeyState (CMSWindowsDesks *desks, void *eventTarget) | |
virtual void | fakeKeyDown (KeyID id, KeyModifierMask mask, KeyButton button) |
Fake a key press. | |
virtual void | fakeKeyRepeat (KeyID id, KeyModifierMask mask, SInt32 count, KeyButton button) |
Fake a key repeat. | |
virtual bool | fakeCtrlAltDel () |
Fake ctrl+alt+del. | |
virtual KeyModifierMask | pollActiveModifiers () const |
Get the active modifiers from OS. | |
virtual SInt32 | pollActiveGroup () const |
Get the active keyboard layout from OS. | |
virtual void | pollPressedKeys (KeyButtonSet &pressedKeys) const |
Get the keys currently pressed from OS. | |
virtual void | onKey (KeyButton button, bool down, KeyModifierMask newState) |
Handle key event. | |
virtual void | sendKeyEvent (void *target, bool press, bool isAutoRepeat, KeyID key, KeyModifierMask mask, SInt32 count, KeyButton button) |
Post a key event. | |
manipulators | |
void | disable () |
Handle screen disabling. | |
void | setKeyLayout (HKL keyLayout) |
Set the active keyboard layout. | |
bool | testAutoRepeat (bool press, bool isRepeat, KeyButton) |
Test and set autorepeat state. | |
void | saveModifiers () |
Remember modifier state. | |
void | useSavedModifiers (bool enable) |
Set effective modifier state. | |
Protected Member Functions | |
virtual void | getKeyMap (CKeyMap &keyMap) |
Get the keyboard map. | |
virtual void | fakeKey (const Keystroke &keystroke) |
Fake a key event. | |
virtual KeyModifierMask & | getActiveModifiersRValue () |
Get the active modifiers. |
This class maps KeyIDs to keystrokes.
Definition at line 32 of file CMSWindowsKeyState.h.
|
Check if keyboard groups have changed. Returns true iff the number or order of the keyboard groups have changed since the last call to updateKeys(). Definition at line 710 of file CMSWindowsKeyState.cpp. |
|
Handle screen disabling. Called when screen is disabled. This is needed to deal with platform brokenness. Definition at line 597 of file CMSWindowsKeyState.cpp. Referenced by CMSWindowsScreen::disable(). |
|
Fake ctrl+alt+del. Synthesize a press of ctrl+alt+del. Return true if processing is complete and false if normal key processing should continue. Implements CKeyState. Definition at line 781 of file CMSWindowsKeyState.cpp. References fakeKeyDown(), virtualKeyToButton(), and CThread::wait(). |
|
Fake a key event.
Synthesize an event for Implements CKeyState. Definition at line 1187 of file CMSWindowsKeyState.cpp. References CMSWindowsDesks::fakeKeyEvent(), CKeyState::getActiveModifiers(), CKeyState::getEffectiveGroup(), CKeyMap::KeyItem::m_button, CKeyMap::KeyItem::m_client, and pollActiveGroup(). |
|
Fake a key press. Synthesizes a key press event and updates the key state. Reimplemented from CKeyState. Definition at line 767 of file CMSWindowsKeyState.cpp. References CKeyState::fakeKeyDown(). Referenced by fakeCtrlAltDel(). |
|
Fake a key repeat. Synthesizes a key repeat event and updates the key state. Reimplemented from CKeyState. Definition at line 774 of file CMSWindowsKeyState.cpp. References CKeyState::fakeKeyRepeat(). |
|
Get the active modifiers. Returns the modifiers that are currently active according to our shadowed state. The state may be modified. Reimplemented from CKeyState. Definition at line 1243 of file CMSWindowsKeyState.cpp. References CKeyState::getActiveModifiersRValue(). Referenced by useSavedModifiers(). |
|
Map virtual key and button to KeyID.
Returns the KeyID for virtual key Definition at line 1367 of file CMSWindowsKeyState.cpp. Referenced by getKeyMap(), and mapKeyFromEvent(). |
|
Get the keyboard map.
Fills Implements CKeyState. Definition at line 880 of file CMSWindowsKeyState.cpp. References getKeyID(), CKeyMap::initModifierKey(), CKeyMap::KeyItem::m_button, CKeyMap::KeyItem::m_client, CKeyMap::KeyItem::m_generates, CKeyMap::KeyItem::m_group, CKeyMap::KeyItem::m_id, CKeyMap::KeyItem::m_required, and CKeyMap::KeyItem::m_sensitive. |
|
Map key event to a key. Converts a key event into a KeyID and the shadow modifier state to a modifier mask. Definition at line 656 of file CMSWindowsKeyState.cpp. References CKeyState::getActiveModifiers(), and getKeyID(). |
|
Map key to virtual key.
Returns the virtual key for key Definition at line 717 of file CMSWindowsKeyState.cpp. Referenced by CMSWindowsScreen::registerHotKey(). |
|
Handle key event.
Sets the state of Reimplemented from CKeyState. Definition at line 732 of file CMSWindowsKeyState.cpp. References CKeyState::onKey(). |
|
Get the active keyboard layout from OS. Returns the active keyboard layout according to the operating system. Implements CKeyState. Definition at line 848 of file CMSWindowsKeyState.cpp. Referenced by fakeKey(). |
|
Get the active modifiers from OS. Returns the modifiers that are currently active according to the operating system. Implements CKeyState. Definition at line 821 of file CMSWindowsKeyState.cpp. References CKeyState::isKeyDown(), and virtualKeyToButton(). |
|
Get the keys currently pressed from OS.
Adds any keys that are currently pressed according to the operating system to Implements CKeyState. Definition at line 868 of file CMSWindowsKeyState.cpp. |
|
Remember modifier state. Records the current non-toggle modifier state. Definition at line 635 of file CMSWindowsKeyState.cpp. References CKeyState::getActiveModifiers(). Referenced by CMSWindowsScreen::leave(). |
|
Post a key event. Posts a key event. This may adjust the event or post additional events in some circumstances. If this is overridden it must forward to the superclass. Reimplemented from CKeyState. Definition at line 741 of file CMSWindowsKeyState.cpp. References CKeyState::sendKeyEvent(). |
|
Set the active keyboard layout.
Uses Definition at line 614 of file CMSWindowsKeyState.cpp. Referenced by CMSWindowsScreen::leave(). |
|
Test and set autorepeat state. Returns true if the given button is autorepeating and updates internal state. Definition at line 620 of file CMSWindowsKeyState.cpp. |
|
Set effective modifier state.
Temporarily sets the non-toggle modifier state to those saved by the last call to Definition at line 642 of file CMSWindowsKeyState.cpp. References CKeyState::getActiveModifiers(), and getActiveModifiersRValue(). Referenced by CMSWindowsScreen::fakeInputBegin(), and CMSWindowsScreen::fakeInputEnd(). |
|
Map a virtual key to a button.
Returns the button for the Definition at line 608 of file CMSWindowsKeyState.cpp. Referenced by fakeCtrlAltDel(), and pollActiveModifiers(). |