diff --git a/frontend/src/ts/controllers/input-controller.ts b/frontend/src/ts/controllers/input-controller.ts index 1e0624281..0add51422 100644 --- a/frontend/src/ts/controllers/input-controller.ts +++ b/frontend/src/ts/controllers/input-controller.ts @@ -761,6 +761,8 @@ function handleTab(event: JQuery.KeyDownEvent, popupVisible: boolean): void { } } +let lastBailoutAttempt = -1; + $(document).keydown(async (event) => { if (ActivePage.get() == "loading") return; @@ -874,8 +876,23 @@ $(document).keydown(async (event) => { CustomTextState.isCustomTextLong() ?? false ) ) { - TestInput.setBailout(true); - TestLogic.finish(); + const delay = Date.now() - lastBailoutAttempt; + if (lastBailoutAttempt === -1 || delay > 200) { + lastBailoutAttempt = Date.now(); + if (delay >= 5000) { + Notifications.add( + "Please double tap shift+enter to confirm bail out", + 0, + { + important: true, + duration: 5000, + } + ); + } + } else { + TestInput.setBailout(true); + TestLogic.finish(); + } } } else { handleChar("\n", TestInput.input.current.length);