diff --git a/src/js/script.js b/src/js/script.js index 5323c7357..690aefbf6 100644 --- a/src/js/script.js +++ b/src/js/script.js @@ -750,15 +750,15 @@ function showWords() { if (Config.mode === "zen") { $(document.querySelector(".word")).remove(); - } - - if (Config.keymapMode === "next") { - Keymap.highlightKey( - wordsList[currentWordIndex] - .substring(currentInput.length, currentInput.length + 1) - .toString() - .toUpperCase() - ); + } else { + if (Config.keymapMode === "next") { + Keymap.highlightKey( + wordsList[currentWordIndex] + .substring(currentInput.length, currentInput.length + 1) + .toString() + .toUpperCase() + ); + } } TestUI.updateActiveElement(); @@ -4137,7 +4137,7 @@ function handleBackspace(event) { Sound.playClick(Config.playSoundOnClick); if (Config.keymapMode === "react") { Keymap.flashKey(event.code, true); - } else if (Config.keymapMode === "next") { + } else if (Config.keymapMode === "next" && Config.mode !== "zen") { Keymap.highlightKey( wordsList[currentWordIndex] .substring(currentInput.length, currentInput.length + 1) @@ -4307,7 +4307,7 @@ function handleSpace(event, isEnter) { if (Config.keymapMode === "react") { Keymap.flashKey(event.code, true); - } else if (Config.keymapMode === "next") { + } else if (Config.keymapMode === "next" && Config.mode !== "zen") { Keymap.highlightKey( wordsList[currentWordIndex] .substring(currentInput.length, currentInput.length + 1) @@ -4600,7 +4600,7 @@ function handleAlpha(event) { //keymap if (Config.keymapMode === "react") { Keymap.flashKey(event.key, thisCharCorrect); - } else if (Config.keymapMode === "next") { + } else if (Config.keymapMode === "next" && Config.mode !== "zen") { Keymap.highlightKey( wordsList[currentWordIndex] .substring(currentInput.length, currentInput.length + 1) diff --git a/src/js/test/keymap.js b/src/js/test/keymap.js index 9a43b6776..f65184edd 100644 --- a/src/js/test/keymap.js +++ b/src/js/test/keymap.js @@ -4,6 +4,7 @@ import layouts from "./layouts"; //TODO remove after wordslist and currentinput and current word index are in a module export function highlightKey(currentKey) { + if (Config.keymapMode === "next") return; try { if ($(".active-key") != undefined) { $(".active-key").removeClass("active-key");