-
Notifications
You must be signed in to change notification settings - Fork 0
Add activeScreenOnly and disableGlobalHotkeyRegister hotkey options with GUI support #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 11 commits
1c3a562
b0fa028
16ad1e8
5ca471b
bb5c8df
1d34a81
6a45d64
9e750ca
1242e7c
1f96815
b43b968
b801574
86a73cc
ef435af
e72ce1a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,8 @@ inline static const QString LockToScreen = QStringLiteral("lockCursorToScreen"); | |
| inline static const QString ActiveOnRelease = QStringLiteral("activeOnRelease"); | ||
| inline static const QString HasScreens = QStringLiteral("hasScreens"); | ||
| inline static const QString RestartServer = QStringLiteral("restartServer"); | ||
| inline static const QString ActiveScreenOnly = QStringLiteral("activeScreenOnly"); | ||
| inline static const QString DisableGlobalHotkeyRegister = QStringLiteral("disableGlobalHotkeyRegister"); | ||
|
||
| } // namespace SettingsKeys | ||
|
|
||
| class Action | ||
|
|
@@ -106,6 +108,14 @@ class Action | |
| { | ||
| return m_restartServer; | ||
| } | ||
| bool activeScreenOnly() const | ||
| { | ||
| return m_activeScreenOnly; | ||
| } | ||
| bool disableGlobalHotkeyRegister() const | ||
| { | ||
| return m_disableGlobalHotkeyRegister; | ||
| } | ||
|
||
|
|
||
| bool operator==(const Action &a) const = default; | ||
|
|
||
|
|
@@ -150,6 +160,14 @@ class Action | |
| { | ||
| m_restartServer = b; | ||
| } | ||
| void setActiveScreenOnly(bool b) | ||
| { | ||
| m_activeScreenOnly = b; | ||
| } | ||
| void setDisableGlobalHotkeyRegister(bool b) | ||
| { | ||
| m_disableGlobalHotkeyRegister = b; | ||
| } | ||
|
||
|
|
||
| private: | ||
| KeySequence m_keySequence; | ||
|
|
@@ -160,7 +178,9 @@ class Action | |
| int m_lockCursorMode = static_cast<int>(LockCursorMode::toggle); | ||
| bool m_activeOnRelease = false; | ||
| bool m_hasScreens = false; | ||
| bool m_restartServer; | ||
| bool m_restartServer = false; | ||
| bool m_activeScreenOnly = false; | ||
| bool m_disableGlobalHotkeyRegister = false; | ||
|
||
|
|
||
| inline static const QString m_commandTemplate = QStringLiteral("(%1)"); | ||
| inline static const QStringList m_actionTypeNames{ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation should mention the limitation described in the code comments: when using activeScreenOnly with the primary/server screen, the action won't work if it uses the same keystroke as the condition, because the primary client registers the original keystroke with the OS as a hotkey, which blocks Deskflow from creating fake events for them. Users should be aware of this limitation when configuring hotkeys for the server screen.