diff --git a/src/package.json b/src/package.json index d35f6f34dd..93974dd86f 100644 --- a/src/package.json +++ b/src/package.json @@ -312,6 +312,15 @@ "label": "%views.terminalMenu.label%" } ], + "keybindings": [ + { + "command": "roo-cline.newTask", + "key": "cmd+r", + "mac": "cmd+r", + "win": "ctrl+r", + "linux": "ctrl+r" + } + ], "configuration": { "title": "%configuration.title%", "properties": { diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index 1fe93eb470..06160276b9 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -9,6 +9,7 @@ import { LRUCache } from "lru-cache" import { useDebounceEffect } from "@src/utils/useDebounceEffect" import { appendImages } from "@src/utils/imageUtils" +import { getNewTaskShortcut } from "@src/utils/keyboardShortcuts" import type { ClineAsk, ClineMessage } from "@roo-code/types" @@ -1897,7 +1898,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction= 0 || navigator.userAgent.toUpperCase().indexOf("MAC") >= 0 + + if (isMac) { + // Use ⌘ symbol for Mac + return `⌘${commandKey.toUpperCase()}` + } else { + // Use Ctrl for Windows/Linux + return `Ctrl+${commandKey.toUpperCase()}` + } +} + +/** + * Gets the formatted keyboard shortcut for the new task command + * @returns Formatted keyboard shortcut + */ +export function getNewTaskShortcut(): string { + return getKeyboardShortcut("r") +}