Skip to content

Commit 5d40473

Browse files
committed
スペース=クリック
1 parent ddb8825 commit 5d40473

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/ui-components/menu/GameOverMenu.svelte

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ function handleKeyDown(e: KeyboardEvent) {
4040
buttons[0].focus();
4141
}
4242
e.preventDefault();
43+
} else if (e.key === " ") {
44+
(document.activeElement as HTMLElement)?.click?.();
45+
e.preventDefault();
4346
}
4447
}
4548
if (e.key === "Escape") {

src/ui-components/menu/GoalMenu.svelte

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ function handleKeyDown(e: KeyboardEvent) {
4444
buttons[0].focus();
4545
}
4646
e.preventDefault();
47+
} else if (e.key === " ") {
48+
(document.activeElement as HTMLElement)?.click?.();
49+
e.preventDefault();
4750
}
4851
}
4952
if (e.key === "Escape") {

src/ui-components/menu/PauseMenu.svelte

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ function handleKeyDown(e: KeyboardEvent) {
4444
buttons[0].focus();
4545
}
4646
e.preventDefault();
47+
} else if (e.key === " ") {
48+
(document.activeElement as HTMLElement)?.click?.();
49+
e.preventDefault();
4750
}
4851
}
4952
if (e.key === "Escape") {

0 commit comments

Comments
 (0)