Skip to content

Commit a3e3de4

Browse files
committed
fix: home and end keys not ignored during test, causing desync
closes monkeytypegame#6053
1 parent aba9354 commit a3e3de4

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

frontend/src/ts/constants/ignored-keys.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ export const IgnoredKeys = [
55
"AudioVolumeUp",
66
"AudioVolumeDown",
77
"AudioVolumeMute",
8+
"Home",
9+
"End",
810
];

frontend/src/ts/controllers/input-controller.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,7 @@ $(document).on("keydown", async (event) => {
904904
console.debug(
905905
`Key ${event.key} is on the list of ignored keys. Stopping keydown event.`
906906
);
907+
event.preventDefault();
907908
return;
908909
}
909910

0 commit comments

Comments
 (0)