#include <IKeyState.h>
Inherits IInterface.
Inherited by CKeyState, and IPlatformScreen.
Inheritance diagram for IKeyState:
accessors | |
virtual bool | isKeyDown (KeyButton) const =0 |
Test if key is pressed. | |
virtual KeyModifierMask | getActiveModifiers () const =0 |
Get the active modifiers. | |
virtual KeyModifierMask | pollActiveModifiers () const =0 |
Get the active modifiers from OS. | |
virtual SInt32 | pollActiveGroup () const =0 |
Get the active keyboard layout from OS. | |
virtual void | pollPressedKeys (KeyButtonSet &pressedKeys) const =0 |
Get the keys currently pressed from OS. | |
CEvent::Type | getKeyDownEvent () |
Get key down event type. Event data is CKeyInfo*, count == 1. | |
CEvent::Type | getKeyUpEvent () |
Get key up event type. Event data is CKeyInfo*, count == 1. | |
CEvent::Type | getKeyRepeatEvent () |
Get key repeat event type. Event data is CKeyInfo*. | |
Public Types | |
typedef std::set< KeyButton > | KeyButtonSet |
enum | { kNumButtons = 0x200 } |
Public Member Functions | |
manipulators | |
virtual void | updateKeyMap ()=0 |
Update the keyboard map. | |
virtual void | updateKeyState ()=0 |
Update the key state. | |
virtual void | setHalfDuplexMask (KeyModifierMask)=0 |
Set half-duplex mask. | |
virtual void | fakeKeyDown (KeyID id, KeyModifierMask mask, KeyButton button)=0 |
Fake a key press. | |
virtual void | fakeKeyRepeat (KeyID id, KeyModifierMask mask, SInt32 count, KeyButton button)=0 |
Fake a key repeat. | |
virtual void | fakeKeyUp (KeyButton button)=0 |
Fake a key release. | |
virtual void | fakeAllKeysUp ()=0 |
Fake key releases for all fake pressed keys. | |
virtual bool | fakeCtrlAltDel ()=0 |
Fake ctrl+alt+del. |
This interface provides access to set and query the keyboard state and to synthesize key events.
Definition at line 29 of file IKeyState.h.
|
Fake key releases for all fake pressed keys. Synthesizes a key release event for every key that is synthetically pressed and updates the key state. Implemented in CMSWindowsScreen, CKeyState, CPlatformScreen, and IPlatformScreen. Referenced by CPlatformScreen::fakeAllKeysUp(). |
|
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. Implemented in CMSWindowsKeyState, COSXKeyState, CXWindowsKeyState, CKeyState, CPlatformScreen, and IPlatformScreen. Referenced by CPlatformScreen::fakeCtrlAltDel(). |
|
Fake a key press. Synthesizes a key press event and updates the key state. Implemented in CMSWindowsKeyState, CMSWindowsScreen, CKeyState, CPlatformScreen, and IPlatformScreen. Referenced by CPlatformScreen::fakeKeyDown(). |
|
Fake a key repeat. Synthesizes a key repeat event and updates the key state. Implemented in CMSWindowsKeyState, CMSWindowsScreen, CKeyState, CPlatformScreen, and IPlatformScreen. Referenced by CPlatformScreen::fakeKeyRepeat(). |
|
Fake a key release. Synthesizes a key release event and updates the key state. Implemented in CMSWindowsScreen, CKeyState, CPlatformScreen, and IPlatformScreen. Referenced by CPlatformScreen::fakeKeyUp(). |
|
Get the active modifiers. Returns the modifiers that are currently active according to our shadowed state. Implemented in CKeyState, CPlatformScreen, and IPlatformScreen. Referenced by CPlatformScreen::getActiveModifiers(). |
|
Test if key is pressed. Returns true iff the given key is down. Half-duplex toggles always return false. Implemented in CKeyState, CPlatformScreen, and IPlatformScreen. Referenced by CPlatformScreen::isKeyDown(). |
|
Get the active keyboard layout from OS. Returns the active keyboard layout according to the operating system. Implemented in CMSWindowsKeyState, COSXKeyState, CXWindowsKeyState, CKeyState, CPlatformScreen, and IPlatformScreen. Referenced by CPlatformScreen::pollActiveGroup(). |
|
Get the active modifiers from OS. Returns the modifiers that are currently active according to the operating system. Implemented in CMSWindowsKeyState, COSXKeyState, CXWindowsKeyState, CKeyState, CPlatformScreen, and IPlatformScreen. Referenced by CPlatformScreen::pollActiveModifiers(). |
|
Get the keys currently pressed from OS.
Adds any keys that are currently pressed according to the operating system to Implemented in CMSWindowsKeyState, COSXKeyState, CXWindowsKeyState, CKeyState, CPlatformScreen, and IPlatformScreen. Referenced by CPlatformScreen::pollPressedKeys(). |
|
Set half-duplex mask. Sets which modifier toggle keys are half-duplex. A half-duplex toggle key doesn't report a key release when toggled on and doesn't report a key press when toggled off. Implemented in CKeyState, CPlatformScreen, and IPlatformScreen. Referenced by CPlatformScreen::setHalfDuplexMask(). |
|
Update the keyboard map. Causes the key state to get updated to reflect the current keyboard mapping. Implemented in CKeyState, CPlatformScreen, and IPlatformScreen. Referenced by CPlatformScreen::updateKeyMap(). |
|
Update the key state. Causes the key state to get updated to reflect the physical keyboard state. Implemented in CKeyState, CPlatformScreen, and IPlatformScreen. Referenced by CPlatformScreen::updateKeyState(). |