mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-23 22:33:57 +08:00
allowing shift enter to save progress in book mode
This commit is contained in:
parent
28b510a7e2
commit
1e503417f0
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue