mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-10 05:35:05 +08:00
parent
26c119c6ec
commit
7f428db379
1 changed files with 9 additions and 14 deletions
|
@ -466,20 +466,6 @@ function handleChar(char: string, charIndex: number): void {
|
|||
TestInput.updateLastKeypress();
|
||||
TestInput.pushKeypressWord(TestWords.words.currentIndex);
|
||||
|
||||
//max length of the input is 20 unless in zen mode then its 30
|
||||
if (
|
||||
(Config.mode === "zen" && charIndex < 30) ||
|
||||
(Config.mode !== "zen" &&
|
||||
charIndex < TestWords.words.getCurrent().length + 20)
|
||||
) {
|
||||
TestInput.input.current = resultingWord;
|
||||
}
|
||||
|
||||
Replay.addReplayEvent(
|
||||
thisCharCorrect ? "correctLetter" : "incorrectLetter",
|
||||
char
|
||||
);
|
||||
|
||||
if (!thisCharCorrect && Config.difficulty == "master") {
|
||||
TestInput.input.pushHistory();
|
||||
TestInput.corrected.pushHistory();
|
||||
|
@ -501,6 +487,15 @@ function handleChar(char: string, charIndex: number): void {
|
|||
);
|
||||
}
|
||||
|
||||
//max length of the input is 20 unless in zen mode then its 30
|
||||
if (
|
||||
(Config.mode === "zen" && charIndex < 30) ||
|
||||
(Config.mode !== "zen" &&
|
||||
charIndex < TestWords.words.getCurrent().length + 20)
|
||||
) {
|
||||
TestInput.input.current = resultingWord;
|
||||
}
|
||||
|
||||
//keymap
|
||||
if (Config.keymapMode === "react") {
|
||||
Keymap.flashKey(char, thisCharCorrect);
|
||||
|
|
Loading…
Reference in a new issue