From 77d4a9051995f34eeab114e934ba053c6b2670c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Tue, 23 Apr 2024 16:52:36 +0200 Subject: [PATCH] fix: can't cancel the chord input recording fixes #109 --- src/routes/config/chords/ChordActionEdit.svelte | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/routes/config/chords/ChordActionEdit.svelte b/src/routes/config/chords/ChordActionEdit.svelte index 47495f72..a2e3be77 100644 --- a/src/routes/config/chords/ChordActionEdit.svelte +++ b/src/routes/config/chords/ChordActionEdit.svelte @@ -26,6 +26,8 @@ } function keydown(event: KeyboardEvent) { + // This is obviously a tradeoff + if (event.key === "Tab" || event.key === "Escape") return; if (!editing) return; event.preventDefault(); const input = inputToAction(event, get(serialPort)?.device === "X"); @@ -85,6 +87,7 @@ on:click={edit} on:keydown={keydown} on:keyup={keyup} + on:blur={keyup} > {#if editing && pressedKeys.size === 0} {$LL.configure.chords.HOLD_KEYS()}