From 716ac04e13c476fb2130af31d5c90e5155ca4069 Mon Sep 17 00:00:00 2001 From: hjlarry Date: Tue, 23 Sep 2025 15:40:53 +0800 Subject: [PATCH] add comment shortcut --- web/app/components/workflow/hooks/use-shortcuts.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/web/app/components/workflow/hooks/use-shortcuts.ts b/web/app/components/workflow/hooks/use-shortcuts.ts index b2d71555d7..072c35033d 100644 --- a/web/app/components/workflow/hooks/use-shortcuts.ts +++ b/web/app/components/workflow/hooks/use-shortcuts.ts @@ -36,6 +36,7 @@ export const useShortcuts = (): void => { const { handleModeHand, handleModePointer, + handleModeComment, } = useWorkflowMoveMode() const { handleLayout } = useWorkflowOrganize() const { handleToggleMaximizeCanvas } = useWorkflowCanvasMaximize() @@ -142,6 +143,16 @@ export const useShortcuts = (): void => { useCapture: true, }) + useKeyPress('c', (e) => { + if (shouldHandleShortcut(e)) { + e.preventDefault() + handleModeComment() + } + }, { + exactMatch: true, + useCapture: true, + }) + useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.o`, (e) => { if (shouldHandleShortcut(e)) { e.preventDefault()