History

Require modifier keys for script keybinding capture

Julius Marminge committed 8 months ago

Commit 442bab61 parent 191883e1 file · +3 −0Browse files

Unified · Split

apps/web/src/components/ProjectScriptsControl.tsx+3−0
@@ -122,6 +122,9 @@ function keybindingFromEvent(event: KeyboardEvent<HTMLInputElement>): string | n · 121 unmodified lines
122122 }
123123 if (event.altKey) parts.push("alt");
124124 if (event.shiftKey) parts.push("shift");
125+ if (parts.length === 0) {
126+ return null;
127+ }
125128 parts.push(keyToken);
126129 return parts.join("+");
127130 }