From 27f4e5594531b1dc1150026eba98eb7762017f80 Mon Sep 17 00:00:00 2001 From: Mark Tolmacs Date: Tue, 21 Oct 2025 21:03:45 +0200 Subject: [PATCH] feat: Support special key shortcut highlight --- packages/excalidraw/components/HintViewer.tsx | 5 ++++- packages/excalidraw/locales/en.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/excalidraw/components/HintViewer.tsx b/packages/excalidraw/components/HintViewer.tsx index 3d6fb3539c..d4ca3fd429 100644 --- a/packages/excalidraw/components/HintViewer.tsx +++ b/packages/excalidraw/components/HintViewer.tsx @@ -46,7 +46,10 @@ const getHints = ({ appState.selectedLinearElement?.isDragging || isArrowElement(appState.newElement) ) { - return t("hints.arrowBindModifiers"); + return t("hints.arrowBindModifiers", { + shortcut_1: getTaggedShortcutKey("Alt"), + shortcut_2: getTaggedShortcutKey("CtrlOrCmd"), + }); } if ( diff --git a/packages/excalidraw/locales/en.json b/packages/excalidraw/locales/en.json index d66ab68a80..d6fd2654bf 100644 --- a/packages/excalidraw/locales/en.json +++ b/packages/excalidraw/locales/en.json @@ -341,7 +341,7 @@ "canvasPanning": "To move canvas, hold {{shortcut_1}} or {{shortcut_2}} while dragging, or use the hand tool", "linearElement": "Click to start multiple points, drag for single line", "arrowTool": "Click to start multiple points, drag for single line. Press {{shortcut}} again to change arrow type.", - "arrowBindModifiers": "Hold Alt to bind inside, or CtrlOrCmd to disable binding", + "arrowBindModifiers": "Hold {{shortcut_1}} to bind inside, or {{shortcut_2}} to disable binding", "freeDraw": "Click and drag, release when you're finished", "text": "Tip: you can also add text by double-clicking anywhere with the selection tool", "embeddable": "Click-drag to create a website embed",