apps/docs/docs/features/keyboard-shortcuts.md
The Roo Code interface supports keyboard navigation and shortcuts to streamline your workflow and reduce dependence on mouse interactions.
Roo Code offers keyboard commands to enhance your workflow. This page focuses on the roo-cline.acceptInput command, but here's a quick reference to all keyboard commands:
| Command | Description | Default Shortcut |
|---|---|---|
roo-cline.acceptInput | Submit text or accept the primary suggestion | None (configurable) |
roo-cline.focusInput | Focus the Roo input box | None (configurable) |
roo-cline.openInNewTab | Open Roo Code in a new editor tab | None (via Command Palette) |
| Add to Context | Add selected code to Roo's context | macOS: Cmd+K Cmd+A; Windows/Linux: Ctrl+K Ctrl+A |
| Arrow Up/Down | Navigate through prompt history | Built-in |
The roo-cline.acceptInput command lets you submit text or accept suggestions with keyboard shortcuts instead of clicking buttons or pressing Enter in the input area.
The roo-cline.acceptInput command is a general-purpose input submission command. When triggered, it:
Ctrl+Shift+P or Cmd+Shift+P on Mac)Ctrl+Enter or Alt+Enter)Ctrl+Shift+P or Cmd+Shift+P on Mac){
"key": "ctrl+enter", // or your preferred key combination
"command": "roo-cline.acceptInput",
"when": "view == roo-cline.SidebarProvider || activeWebviewPanelId == roo-cline.TabPanelProvider"
}
Scoped examples:
{
"key": "ctrl+enter",
"command": "roo-cline.acceptInput",
"when": "view == roo-cline.SidebarProvider"
}
{
"key": "ctrl+enter",
"command": "roo-cline.acceptInput",
"when": "activeWebviewPanelId == roo-cline.TabPanelProvider"
}
Choose a key combination that doesn't conflict with existing VS Code shortcuts:
Alt+Enter - Easy to press while typingCtrl+Space - Familiar for those who use autocompleteCtrl+Enter - Intuitive for command executionAlt+A - Mnemonic for "Accept"editorTextFocus && editorHasSelectionroo-cline.focusInput) or click into the Roo panel.:::note Redo Shortcut Restored The standard Redo shortcut (macOS: Cmd+Y; Windows/Linux: Ctrl+Y) remains unchanged and is available for its usual function in VS Code. :::
The roo-cline.acceptInput command was designed with accessibility in mind:
Here are some complete workflow examples showing how to effectively use keyboard shortcuts with Roo:
roo-cline.acceptInput shortcut to select the first suggestion| Issue | Solution |
|---|---|
| Shortcut doesn't work | Ensure Roo is focused (click in the Roo panel first) |
| Wrong suggestion selected | The command always selects the first (primary) button; use mouse if you need a different option |
| Conflicts with existing shortcuts | Try a different key combination in VS Code keyboard settings |
| No visual feedback when used | This is normal - the command silently activates the function without visual confirmation |
| Shortcut works inconsistently | Make sure the when clause is properly configured (use view == roo-cline.SidebarProvider or activeWebviewPanelId == roo-cline.TabPanelProvider) |
The roo-cline.acceptInput command is implemented as follows:
roo-cline.acceptInput with display title "Roo: Accept Input/Suggestion" in the command paletteNavigate your prompt history with a terminal-like experience using the arrow keys. This feature makes it easy to reuse and refine previous prompts, whether from your current conversation or past tasks.
Before: Reusing a prompt meant scrolling up, copying, and pasting.
With Prompt History Navigation: Quickly access past prompts without leaving the keyboard.
The navigation is designed to be intuitive and adapt to your current context.
This feature is enabled by default. There are no settings to configure.
"Why doesn't anything happen when I press the up arrow?"
"What's the difference between conversation and task history?"