From 81fd2350a933d85187bc1883b4788240966ce9bb Mon Sep 17 00:00:00 2001 From: David Luzar Date: Sat, 19 Nov 2022 18:28:08 +0100 Subject: [PATCH] fix: stop replacing `del` word with `Delete` (#5897) --- src/actions/shortcuts.ts | 2 +- src/components/HelpDialog.tsx | 2 +- src/utils.ts | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/actions/shortcuts.ts b/src/actions/shortcuts.ts index 2594c53b..41686e52 100644 --- a/src/actions/shortcuts.ts +++ b/src/actions/shortcuts.ts @@ -48,7 +48,7 @@ const shortcutMap: Record = { copyStyles: [getShortcutKey("CtrlOrCmd+Alt+C")], pasteStyles: [getShortcutKey("CtrlOrCmd+Alt+V")], selectAll: [getShortcutKey("CtrlOrCmd+A")], - deleteSelectedElements: [getShortcutKey("Del")], + deleteSelectedElements: [getShortcutKey("Delete")], duplicateSelection: [ getShortcutKey("CtrlOrCmd+D"), getShortcutKey(`Alt+${t("helpDialog.drag")}`), diff --git a/src/components/HelpDialog.tsx b/src/components/HelpDialog.tsx index 1228cb91..dac14758 100644 --- a/src/components/HelpDialog.tsx +++ b/src/components/HelpDialog.tsx @@ -303,7 +303,7 @@ export const HelpDialog = ({ onClose }: { onClose?: () => void }) => { /> { shortcut = shortcut .replace(/\bAlt\b/i, "Alt") .replace(/\bShift\b/i, "Shift") - .replace(/\b(Enter|Return)\b/i, "Enter") - .replace(/\bDel\b/i, "Delete"); + .replace(/\b(Enter|Return)\b/i, "Enter"); if (isDarwin) { return shortcut