Skip to content

Commit

Permalink
fix: enter not working as space in 58008 funbox if quick restart was …
Browse files Browse the repository at this point in the history
…set to enter
  • Loading branch information
Miodec committed May 6, 2024
1 parent bc7ca45 commit 9714ac9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
10 changes: 3 additions & 7 deletions frontend/src/ts/controllers/input-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -974,8 +974,9 @@ $(document).on("keydown", async (event) => {
if (Config.mode === "zen") {
//do nothing
} else if (
!TestWords.hasNewline ||
(TestWords.hasNewline && event.shiftKey)
(!TestWords.hasNewline && !Config.funbox.includes("58008")) ||
((TestWords.hasNewline || Config.funbox.includes("58008")) &&
event.shiftKey)
) {
// in case we are in a long test, setting manual restart
if (event.shiftKey) {
Expand All @@ -988,11 +989,6 @@ $(document).on("keydown", async (event) => {
TestLogic.restart({
event,
});
} else {
setWordsInput(" " + TestInput.input.current);
if (Config.tapeMode !== "off") {
TestUI.scrollTape();
}
}
}

Expand Down
5 changes: 4 additions & 1 deletion frontend/src/ts/elements/modes-notice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ export async function update(): Promise<void> {
}
}

if (TestWords.hasNewline && Config.quickRestart === "enter") {
if (
(TestWords.hasNewline || Config.funbox.includes("58008")) &&
Config.quickRestart === "enter"
) {
$(".pageTest #testModesNotice").append(
`<div class="textButton noInteraction"><i class="fas fa-level-down-alt fa-rotate-90"></i>shift + enter to restart</div>`
);
Expand Down

0 comments on commit 9714ac9

Please sign in to comment.