History

Require modifier keys for script keybinding capture

Julius Marminge committed 9 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
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 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t