Deskflow 1.22.0.197
Keyboard and mouse sharing utility
|
A key state for Ei. More...
#include <EiKeyState.h>
Public Member Functions | |
EiKeyState (EiScreen *screen, IEventQueue *events) | |
~EiKeyState () override | |
void | init (int fd, std::size_t len) |
void | initDefaultKeymap () |
bool | fakeCtrlAltDel () override |
Fake ctrl+alt+del. | |
KeyModifierMask | pollActiveModifiers () const override |
Get the active modifiers from OS. | |
std::int32_t | pollActiveGroup () const override |
Get the active keyboard layout from OS. | |
void | pollPressedKeys (KeyButtonSet &pressedKeys) const override |
Get the keys currently pressed from OS. | |
KeyID | mapKeyFromKeyval (std::uint32_t keyval) const |
void | updateXkbState (std::uint32_t keyval, bool is_pressed) |
Public Member Functions inherited from KeyState | |
KeyState (IEventQueue *events, std::vector< std::string > layouts, bool isLangSyncEnabled) | |
KeyState (IEventQueue *events, deskflow::KeyMap &keyMap, std::vector< std::string > layouts, bool isLangSyncEnabled) | |
~KeyState () override | |
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, int32_t count, KeyButton button) |
Post a key event. | |
void | updateKeyMap (deskflow::KeyMap *existing) |
void | updateKeyMap () override |
Update the keyboard map. | |
void | updateKeyState () override |
Update the key state. | |
void | setHalfDuplexMask (KeyModifierMask) override |
Set half-duplex mask. | |
void | fakeKeyDown (KeyID id, KeyModifierMask mask, KeyButton button, const std::string &lang) override |
Fake a key press. | |
bool | fakeKeyRepeat (KeyID id, KeyModifierMask mask, int32_t count, KeyButton button, const std::string &lang) override |
Fake a key repeat. | |
bool | fakeKeyUp (KeyButton button) override |
Fake a key release. | |
void | fakeAllKeysUp () override |
Fake key releases for all fake pressed keys. | |
bool | fakeMediaKey (KeyID id) override |
Fake a media key. | |
bool | isKeyDown (KeyButton) const override |
Test if key is pressed. | |
KeyModifierMask | getActiveModifiers () const override |
Get the active modifiers. | |
int32_t | getKeyState (KeyButton keyButton) const |
Public Member Functions inherited from IKeyState | |
IKeyState (const IEventQueue *events) | |
Public Member Functions inherited from IInterface | |
virtual | ~IInterface ()=default |
Interface destructor does nothing. |
Protected Member Functions | |
void | getKeyMap (KeyMap &keyMap) override |
Get the keyboard map. | |
void | fakeKey (const Keystroke &keystroke) override |
Fake a key event. | |
Protected Member Functions inherited from KeyState | |
virtual KeyModifierMask & | getActiveModifiersRValue () |
Get the active modifiers. | |
int32_t | getEffectiveGroup (int32_t group, int32_t offset) const |
Compute a group number. | |
virtual bool | isIgnoredKey (KeyID key, KeyModifierMask mask) const |
Check if key is ignored. | |
KeyButton | getButton (KeyID id, int32_t group) const |
Get button for a KeyID. |
Additional Inherited Members | |
Public Types inherited from IKeyState | |
using | KeyButtonSet = std::set<KeyButton> |
Static Public Attributes inherited from IKeyState | |
static const auto | s_numButtons = 0x200 |
using | Keystroke = deskflow::KeyMap::Keystroke |
A key state for Ei.
deskflow::EiKeyState::EiKeyState | ( | EiScreen * | screen, |
IEventQueue * | events ) |
|
override |
|
overridevirtual |
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 KeyState.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
void deskflow::EiKeyState::init | ( | int | fd, |
std::size_t | len ) |
void deskflow::EiKeyState::initDefaultKeymap | ( | ) |
KeyID deskflow::EiKeyState::mapKeyFromKeyval | ( | std::uint32_t | keyval | ) | const |
|
overridevirtual |
Get the active keyboard layout from OS.
Returns the active keyboard layout according to the operating system.
Implements KeyState.
|
overridevirtual |
Get the active modifiers from OS.
Returns the modifiers that are currently active according to the operating system.
Implements KeyState.
|
overridevirtual |
Get the keys currently pressed from OS.
Adds any keys that are currently pressed according to the operating system to pressedKeys
.
Implements KeyState.
void deskflow::EiKeyState::updateXkbState | ( | std::uint32_t | keyval, |
bool | is_pressed ) |