Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

fix: stop replacing `del` word with `Delete` (#5897)

David Luzar81fd2350a933
diff --git a/src/actions/shortcuts.ts b/src/actions/shortcuts.ts
index 2594c53b36..41686e5213 100644
--- a/src/actions/shortcuts.ts
+++ b/src/actions/shortcuts.ts
@@ -48,7 +48,7 @@ const shortcutMap: Record<ShortcutName, string[]> = {
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 1228cb91fc..dac147583b 100644
--- a/src/components/HelpDialog.tsx
+++ b/src/components/HelpDialog.tsx
@@ -303,7 +303,7 @@ export const HelpDialog = ({ onClose }: { onClose?: () => void }) => {
/>
<Shortcut
label={t("labels.delete")}
- shortcuts={[getShortcutKey("Del")]}
+ shortcuts={[getShortcutKey("Delete")]}
/>
<Shortcut
label={t("labels.sendToBack")}
diff --git a/src/utils.ts b/src/utils.ts
index 29e0eb38b6..9a92560dc8 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -326,8 +326,7 @@ export const getShortcutKey = (shortcut: string): string => {
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