diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-08-31 00:58:33 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-08-31 00:58:33 +0200 |
| commit | 21dac9f09e17f4f1be4ddfad7474400787051a7c (patch) | |
| tree | f5fe5338a1799b2652ce5f3285dee73388b2be99 | |
| parent | 5abddb0a22c73b745e748409bc2fa46750ddd4d7 (diff) | |
| download | opencut-21dac9f09e17f4f1be4ddfad7474400787051a7c.tar.gz | |
fix space key to play
| -rw-r--r-- | apps/web/src/stores/keybindings-store.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/web/src/stores/keybindings-store.ts b/apps/web/src/stores/keybindings-store.ts index 7fa0da5e..febcaa30 100644 --- a/apps/web/src/stores/keybindings-store.ts +++ b/apps/web/src/stores/keybindings-store.ts @@ -206,6 +206,9 @@ function getPressedKey(ev: KeyboardEvent): string | null { const key = (ev.key ?? "").toLowerCase(); const code = ev.code ?? ""; + if (code === "Space" || key === " " || key === "spacebar" || key === "space") + return "space"; + // Check arrow keys if (key.startsWith("arrow")) { return key.slice(5); @@ -213,7 +216,6 @@ function getPressedKey(ev: KeyboardEvent): string | null { // Check for special keys if (key === "tab") return "tab"; - if (key === " " || key === "space") return "space"; if (key === "home") return "home"; if (key === "end") return "end"; if (key === "delete") return "delete"; |
