commit 320b94eec3221811274c66fafdcc93ec7119edf0 Author: Oleg Solovyov Date: Mon Jan 31 18:04:42 2022 +0300 Disallow modifierless keys in whole sequence Since multi-sequence allowed, modifierless keys can be stored as widget activation hotkey. Which blocks input into these widgets if key matches the sequence. e.g. "Alt+F, F, H" sequence grabs "f" and "h" keys which is bad when typing a search query. diff --git a/src/recorder/keysequencerecorder.cpp b/src/recorder/keysequencerecorder.cpp index dcc05da..bf6eef1 100644 --- a/src/recorder/keysequencerecorder.cpp +++ b/src/recorder/keysequencerecorder.cpp @@ -332,8 +332,8 @@ void KeySequenceRecorderPrivate::handleKeyPress(QKeyEvent *event) Q_EMIT q->currentKeySequenceChanged(); break; default: - if (m_currentKeySequence.count() == 0 && !(m_currentModifiers & ~Qt::ShiftModifier)) { - // It's the first key and no modifier pressed. Check if this is allowed + if (!(m_currentModifiers & ~Qt::ShiftModifier)) { + // It's no modifier pressed. Check if this is allowed if (!(isOkWhenModifierless(key) || m_modifierlessAllowed)) { // No it's not return;