105 void onGlobalShortcutActiveChanged(QAction *action,
bool active);
114 bool parseSequence(QKeySequence *sequence, QString *errorMessage =
nullptr) const;
119 QAction *m_action =
nullptr;
121 QKeySequence m_assignedSequence;
123 int m_pressedEvents = 0;
125 int m_releasedEvents = 0;
127 bool m_registered = false;
129 bool m_shortcutActive = false;
Wraps KGlobalAccel registration for Mutterkey's push-to-talk shortcut.
~HotkeyManager() override
Unregisters the shortcut and releases owned KDE objects.
void shortcutReleased()
Emitted when the registered shortcut is released.
QJsonObject diagnostics() const
Returns diagnostic state about registration and event counts.
void shortcutPressed()
Emitted when the registered shortcut becomes active.
bool registerShortcut(QString *errorMessage=nullptr)
Registers the configured shortcut with KDE global accel.
bool invokeShortcut(QString *errorMessage=nullptr)
Simulates shortcut invocation through the KDE action object.
void unregisterShortcut()
Unregisters the shortcut if it is currently active.
HotkeyManager(ShortcutConfig config, QObject *parent=nullptr)
Creates a hotkey manager with a fixed shortcut configuration.
Runtime configuration types, defaults, and JSON loading entrypoints.
QString keySequenceListToPortableText(const QList< QKeySequence > &sequences)
Formats a key sequence list as portable-text diagnostics.
QJsonArray keySequenceToDiagnosticJson(const QKeySequence &sequence)
Converts an assigned key sequence into the diagnostic JSON payload shape.
QKeySequence parseConfiguredKeySequence(const QString &sequenceText)
Parses a configured shortcut string into a Qt key sequence.
Global shortcut registration settings.