allowing shift enter to save progress in book mode

This commit is contained in:
Miodec 2022-10-10 20:13:02 +02:00
parent 28b510a7e2
commit 1e503417f0

View file

@ -28,6 +28,7 @@ import * as CompositionState from "../states/composition";
import * as TestInput from "../test/test-input";
import * as TestWords from "../test/test-words";
import * as Hangul from "hangul-js";
import * as CustomTextState from "../states/custom-text-name";
import { navigate } from "../observables/navigate-event";
let dontInsertSpace = false;
@ -881,6 +882,13 @@ $(document).keydown(async (event) => {
) {
TestInput.setBailout(true);
TestLogic.finish();
} else if (
event.shiftKey &&
Config.mode == "custom" &&
CustomTextState.isCustomTextLong() === true
) {
TestInput.setBailout(true);
TestLogic.finish();
} else {
handleChar("\n", TestInput.input.current.length);
setWordsInput(" " + TestInput.input.current);