Deskflow 1.22.0.197
Keyboard and mouse sharing utility
|
Key state interface. More...
#include <IKeyState.h>
Classes | |
class | KeyInfo |
Key event data. More... |
Public Types | |
using | KeyButtonSet = std::set<KeyButton> |
Public Member Functions | |
IKeyState (const IEventQueue *events) | |
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, const std::string &lang)=0 |
Fake a key press. | |
virtual bool | fakeKeyRepeat (KeyID id, KeyModifierMask mask, int32_t count, KeyButton button, const std::string &lang)=0 |
Fake a key repeat. | |
virtual bool | 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. | |
virtual bool | fakeMediaKey (KeyID id)=0 |
Fake a media key. | |
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 int32_t | pollActiveGroup () const =0 |
Get the active keyboard layout from OS. | |
virtual void | pollPressedKeys (KeyButtonSet &pressedKeys) const =0 |
Get the keys currently pressed from OS. | |
Public Member Functions inherited from IInterface | |
virtual | ~IInterface ()=default |
Interface destructor does nothing. |
Static Public Attributes | |
static const auto | s_numButtons = 0x200 |
Key state interface.
This interface provides access to set and query the keyboard state and to synthesize key events.
using IKeyState::KeyButtonSet = std::set<KeyButton> |
|
explicit |
|
pure virtual |
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 IPlatformScreen, KeyState, MSWindowsScreen, and PlatformScreen.
|
pure virtual |
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 deskflow::EiKeyState, IPlatformScreen, KeyState, MSWindowsKeyState, OSXKeyState, PlatformScreen, and XWindowsKeyState.
|
pure virtual |
Fake a key press.
Synthesizes a key press event and updates the key state.
Implemented in IPlatformScreen, KeyState, MSWindowsKeyState, MSWindowsScreen, and PlatformScreen.
|
pure virtual |
Fake a key repeat.
Synthesizes a key repeat event and updates the key state.
Implemented in IPlatformScreen, KeyState, MSWindowsKeyState, MSWindowsScreen, and PlatformScreen.
|
pure virtual |
Fake a key release.
Synthesizes a key release event and updates the key state.
Implemented in IPlatformScreen, KeyState, MSWindowsScreen, and PlatformScreen.
|
pure virtual |
Fake a media key.
Synthesizes a media key down and up. Only Mac would implement this by use cocoa appkit framework.
Implemented in IPlatformScreen, KeyState, and OSXKeyState.
|
pure virtual |
Get the active modifiers.
Returns the modifiers that are currently active according to our shadowed state.
Implemented in IPlatformScreen, KeyState, and PlatformScreen.
|
pure virtual |
Test if key is pressed.
Returns true iff the given key is down. Half-duplex toggles always return false.
Implemented in IPlatformScreen, KeyState, and PlatformScreen.
|
pure virtual |
Get the active keyboard layout from OS.
Returns the active keyboard layout according to the operating system.
Implemented in deskflow::EiKeyState, IPlatformScreen, KeyState, MSWindowsKeyState, OSXKeyState, PlatformScreen, and XWindowsKeyState.
|
pure virtual |
Get the active modifiers from OS.
Returns the modifiers that are currently active according to the operating system.
Implemented in deskflow::EiKeyState, IPlatformScreen, KeyState, MSWindowsKeyState, OSXKeyState, PlatformScreen, and XWindowsKeyState.
|
pure virtual |
Get the keys currently pressed from OS.
Adds any keys that are currently pressed according to the operating system to pressedKeys
.
Implemented in deskflow::EiKeyState, IPlatformScreen, KeyState, MSWindowsKeyState, OSXKeyState, PlatformScreen, and XWindowsKeyState.
|
pure virtual |
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 IPlatformScreen, KeyState, and PlatformScreen.
|
pure virtual |
Update the keyboard map.
Causes the key state to get updated to reflect the current keyboard mapping.
Implemented in IPlatformScreen, KeyState, and PlatformScreen.
|
pure virtual |
Update the key state.
Causes the key state to get updated to reflect the physical keyboard state.
Implemented in IPlatformScreen, KeyState, and PlatformScreen.
|
inlinestatic |