|
mutterkey
KDE-first push-to-talk transcription tool for KDE Plasma
|
Wraps KGlobalAccel registration for Mutterkey's push-to-talk shortcut. More...
#include <hotkeymanager.h>
Signals | |
| void | shortcutPressed () |
| Emitted when the registered shortcut becomes active. | |
| void | shortcutReleased () |
| Emitted when the registered shortcut is released. | |
Public Member Functions | |
| HotkeyManager (ShortcutConfig config, QObject *parent=nullptr) | |
| Creates a hotkey manager with a fixed shortcut configuration. | |
| ~HotkeyManager () override | |
| Unregisters the shortcut and releases owned KDE objects. | |
| bool | registerShortcut (QString *errorMessage=nullptr) |
| Registers the configured shortcut with KDE global accel. | |
| void | unregisterShortcut () |
| Unregisters the shortcut if it is currently active. | |
| bool | invokeShortcut (QString *errorMessage=nullptr) |
| Simulates shortcut invocation through the KDE action object. | |
| QJsonObject | diagnostics () const |
| Returns diagnostic state about registration and event counts. | |
Wraps KGlobalAccel registration for Mutterkey's push-to-talk shortcut.
The manager owns the QAction used for registration and translates KDE active state changes into press and release signals for the service layer.
Definition at line 44 of file hotkeymanager.h.
|
explicit |
Creates a hotkey manager with a fixed shortcut configuration.
| config | Shortcut registration settings copied into the manager. |
| parent | Optional QObject parent. |
| QJsonObject HotkeyManager::diagnostics | ( | ) | const |
Returns diagnostic state about registration and event counts.
diagnose mode output. | bool HotkeyManager::invokeShortcut | ( | QString * | errorMessage = nullptr | ) |
Simulates shortcut invocation through the KDE action object.
| errorMessage | Optional output for invocation failures. |
true when the action could be invoked. | bool HotkeyManager::registerShortcut | ( | QString * | errorMessage = nullptr | ) |
Registers the configured shortcut with KDE global accel.
| errorMessage | Optional output for registration failures. |
true when registration succeeded.