History

Require modifier keys for script keybinding capture

Julius Marminge committed 8 months ago

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

Showing the changes to apps/web/src/components/ProjectScriptsControl.tsx (1 of 1 file). Show all

Unified · Split

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