KeySequenceRecorder
KeySequenceRecorder
Push button that captures a single key combination when recording. More…
#include <KeySequenceRecorder.hpp>
Inherits from QPushButton
Public Signals
| Name | |
|---|---|
| void | keySequenceRecorded(QKeySequence const & seq) Emitted when a key sequence is successfully captured. |
| void | recordingCancelled() Emitted when recording is cancelled (Escape pressed). |
Public Functions
| Name | |
|---|---|
| KeySequenceRecorder(QWidget * parent =[nullptr]) | |
| void | startRecording() Start recording mode — grabs focus and waits for a key press. |
| void | cancelRecording() Cancel recording without emitting a result. |
| bool | isRecording() const Whether the recorder is currently waiting for a key press. |
Protected Functions
| Name | |
|---|---|
| void | keyPressEvent(QKeyEvent * event) override |
| void | focusOutEvent(QFocusEvent * event) override |
Detailed Description
class KeySequenceRecorder;Push button that captures a single key combination when recording.
Normal state: displays “Record” text. Recording state: displays “Press a key…” and captures the next key event.
Public Signals Documentation
signal keySequenceRecorded
void keySequenceRecorded(
QKeySequence const & seq
)Emitted when a key sequence is successfully captured.
signal recordingCancelled
void recordingCancelled()Emitted when recording is cancelled (Escape pressed).
Public Functions Documentation
function KeySequenceRecorder
explicit KeySequenceRecorder(
QWidget * parent =nullptr
)function startRecording
void startRecording()Start recording mode — grabs focus and waits for a key press.
function cancelRecording
void cancelRecording()Cancel recording without emitting a result.
function isRecording
inline bool isRecording() constWhether the recorder is currently waiting for a key press.
Protected Functions Documentation
function keyPressEvent
void keyPressEvent(
QKeyEvent * event
) overridefunction focusOutEvent
void focusOutEvent(
QFocusEvent * event
) overrideUpdated on 2026-11-13 at 20:25:40 +0000