From 82e60ba3608de78ad6814da4c67b09fb81da7345 Mon Sep 17 00:00:00 2001 From: felixzsh Date: Wed, 12 Aug 2026 11:31:43 -0500 Subject: [PATCH] fix: drop modifier-only chords from the history Releasing a chord made only of modifiers (Super, Super Ctrl Shift...) is 'mods of nothing': it scores nothing in combo mode and now no longer lingers or occupies a history row either. The mods still show live while held, which is the useful feedback; on release the entry is removed instantly instead of entering its linger window. --- KeyVisualizer.qml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/KeyVisualizer.qml b/KeyVisualizer.qml index a01f184..319e4f6 100644 --- a/KeyVisualizer.qml +++ b/KeyVisualizer.qml @@ -361,8 +361,16 @@ Item { // once here (never on the intermediate growing emits). if (es.length > 0 && es[0].releasedAt === 0) { var completed = es[0].keys.slice() - es[0] = { keys: es[0].keys, releasedAt: Date.now() } - root.pressCombo(completed) + // A chord made only of modifiers is "mods of nothing": it scores + // nothing, so it must not linger or occupy a history row either. + // Drop it the moment the keys go up (it still shows live while + // held, which is the useful feedback). + if (root.modCountOf(completed) >= completed.length) { + es.shift() + } else { + es[0] = { keys: es[0].keys, releasedAt: Date.now() } + root.pressCombo(completed) + } } } else if (es.length > 0 && root.sameKeys(es[0].keys, next)) { // Same combo re-pressed (or the state file re-fired): refresh it,