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.
This commit is contained in:
felixzsh
2026-08-12 11:31:43 -05:00
parent e447c69817
commit 82e60ba360
+8
View File
@@ -361,9 +361,17 @@ Item {
// once here (never on the intermediate growing emits).
if (es.length > 0 && es[0].releasedAt === 0) {
var completed = es[0].keys.slice()
// 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,
// no duplicate history entry.