summaryrefslogtreecommitdiff
path: root/apps/web/src/stores/keybindings-store.ts
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2025-09-03 00:02:07 +0200
committerMaze Winther <mazewinther@gmail.com>2025-09-03 00:02:07 +0200
commit60debe2ce52a73dc554a0daa0a127fc836ca123a (patch)
tree9c334f5de4211d0bb7893929ea63c86280679705 /apps/web/src/stores/keybindings-store.ts
parent37d40148087fc7c3497fba31e82bc7c7496bde8d (diff)
parent167e2b83dc072f5d80ab0bf0d3f786a993248c70 (diff)
downloadopencut-60debe2ce52a73dc554a0daa0a127fc836ca123a.tar.gz
Merge branch 'staging'
Diffstat (limited to 'apps/web/src/stores/keybindings-store.ts')
-rw-r--r--apps/web/src/stores/keybindings-store.ts4
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";