Skip to content

Commit 079b788

Browse files
committed
Add backspace to delete shortcuts
Many Macs don't have a 'delete' key, so this is much more common and expected UX wise. No real downside to supporting both, although we'll continue showing just 'Delete' in the tooltips as the preferred option.
1 parent 374598c commit 079b788

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/view/view-page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,15 @@ const ViewPageKeyboardShortcuts = (props: {
114114
}
115115
}, [selectedEvent, props.onBuildRuleFromExchange, props.isPaidUser]);
116116

117-
useHotkeys('Ctrl+Delete, Cmd+Delete', (event) => {
117+
useHotkeys('Ctrl+Delete, Cmd+Delete, Ctrl+Backspace, Cmd+Backspace', (event) => {
118118
if (isEditable(event.target)) return;
119119

120120
if (selectedEvent) {
121121
props.onDelete(selectedEvent);
122122
}
123123
}, [selectedEvent, props.onDelete]);
124124

125-
useHotkeys('Ctrl+Shift+Delete, Cmd+Shift+Delete', (event) => {
125+
useHotkeys('Ctrl+Shift+Delete, Cmd+Shift+Delete, Ctrl+Shift+Backspace, Cmd+Shift+Backspace', (event) => {
126126
props.onClear();
127127
event.preventDefault();
128128
}, [props.onClear]);

0 commit comments

Comments
 (0)