From 9a1e6357d55b2ce76bf9000728e5fbbf56c6bd62 Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 9 Jul 2026 22:06:50 +0200 Subject: [PATCH] fix: keymap next not working correctly --- frontend/src/ts/test/test-ui.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/frontend/src/ts/test/test-ui.ts b/frontend/src/ts/test/test-ui.ts index f5667b69a828..62f2a2b6ca91 100644 --- a/frontend/src/ts/test/test-ui.ts +++ b/frontend/src/ts/test/test-ui.ts @@ -1740,9 +1740,11 @@ function afterAnyTestInput( } if (Config.keymapMode === "next") { - highlight( - TestWords.words.getCurrent()?.text.charAt(getCurrentInput().length) ?? "", - ); + const keyToHighlight = + TestWords.words.getCurrent()?.textWithCommit[getCurrentInput().length]; + if (keyToHighlight !== undefined) { + highlight(keyToHighlight); + } } Focus.set(true); @@ -1828,6 +1830,15 @@ export async function afterTestWordChange( if (lastBurst !== null && Numbers.isSafeNumber(lastBurst)) { void LiveBurst.update(Math.round(lastBurst)); } + + if (Config.keymapMode === "next") { + const keyToHighlight = + TestWords.words.getCurrent()?.textWithCommit[getCurrentInput().length]; + if (keyToHighlight !== undefined) { + highlight(keyToHighlight); + } + } + if (direction === "forward") { // } else if (direction === "back") {