KGuiAddons
kkeysequencerecorder.h
32 * <a href="https://cgit.freedesktop.org/wayland/wayland-protocols/tree/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml">
61 Q_PROPERTY(QKeySequence currentKeySequence READ currentKeySequence WRITE setCurrentKeySequence NOTIFY currentKeySequenceChanged)
76 Q_PROPERTY(bool modifierlessAllowed READ modifierlessAllowed WRITE setModifierlessAllowed NOTIFY modifierlessAllowedChanged)
77 /** Controls the amount of key combinations that are captured until recording stops and gotKeySequence
80 * stop until four valid key combination have been recorded. Afterwards `currentKeySequence().count()`
87 Q_PROPERTY(bool multiKeyShortcutsAllowed READ multiKeyShortcutsAllowed WRITE setMultiKeyShortcutsAllowed NOTIFY multiKeyShortcutsAllowedChanged)
92 * By default, if only a modifier is pressed and then released, the component will remain waiting for the sequence.
99 Q_PROPERTY(bool modifierOnlyAllowed READ modifierOnlyAllowed WRITE setModifierOnlyAllowed NOTIFY modifierOnlyAllowedChanged)
103 * must contain only modifier keys (`Modifier`) or modifiers keys and a normal key (`ModifierAndKey`).
105 * The patterns property can contain one or more recording patterns. For example, if the recorder
116 * The Pattern type specifies what components the recorded shortcut must have, e.g. modifiers or just a key.
171 KGUIADDONS_DEPRECATED_VERSION(6, 12, "use setPatterns() instead") void setModifierlessAllowed(bool allowed);
176 KGUIADDONS_DEPRECATED_VERSION(6, 12, "use patterns() instead") bool modifierlessAllowed() const;
181 KGUIADDONS_DEPRECATED_VERSION(6, 12, "use setPatterns() instead") void setModifierOnlyAllowed(bool allowed);
186 KGUIADDONS_DEPRECATED_VERSION(6, 12, "use patterns() instead") bool modifierOnlyAllowed() const;
212 KGUIADDONS_DEPRECATED_VERSION(6, 12, "use patternsChanged() instead") void modifierlessAllowedChanged();
Record a QKeySequence by listening to key events in a window.
Definition kkeysequencerecorder.h:46
Patterns patterns
Specifies what components the recorded shortcut must have, for example whether the shortcut must cont...
Definition kkeysequencerecorder.h:112
bool multiKeyShortcutsAllowed
Controls the amount of key combinations that are captured until recording stops and gotKeySequence is...
Definition kkeysequencerecorder.h:87
void gotKeySequence(const QKeySequence &keySequence)
This signal is emitted when a key sequence has been recorded.
bool modifierOnlyAllowed
It makes it acceptable for the key sequence to be just a modifier (e.g.
Definition kkeysequencerecorder.h:99
KKeySequenceRecorder(QWindow *window, QObject *parent=nullptr)
Constructor.
Definition kkeysequencerecorder.cpp:541
QWindow * window
The window in which the key events are happening that should be recorded.
Definition kkeysequencerecorder.h:65
Pattern
The Pattern type specifies what components the recorded shortcut must have, e.g.
Definition kkeysequencerecorder.h:118
@ Modifier
The recorded shortcut must contain one or more modifier keys (Meta, Shift, Ctrl, or Alt).
Definition kkeysequencerecorder.h:122
@ Key
The recorded shortcut must contain only one regular key, e.g.
Definition kkeysequencerecorder.h:126
@ ModifierAndKey
The recorded shortcut must contain one or more modifier keys followed by a regular key,...
Definition kkeysequencerecorder.h:136
bool modifierlessAllowed
If key presses of "plain" keys without a modifier are considered to be a valid finished key combinati...
Definition kkeysequencerecorder.h:76
QObject(QObject *parent)
Q_FLAG(...)
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 28 2025 11:55:06 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 28 2025 11:55:06 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.