Keybindings
Claude Code runs inside VS Code’s integrated terminal. Some VS Code shortcuts are intercepted before reaching the terminal, which conflicts with Claude Code’s own keybindings. This page explains the conflicts and three ways to resolve them.
Shortcut Conflicts
Section titled “Shortcut Conflicts”When the terminal is focused, VS Code intercepts these shortcuts before Claude Code can process them:
| Shortcut | VS Code Action | Claude Code Action |
|---|---|---|
| Ctrl+G | Go to Line | External editor |
| Ctrl+S | Save File | Stash conversation |
| Ctrl+T | Open Symbol | Toggle todos |
| Ctrl+O | Open File | Toggle transcript |
| Ctrl+B | Toggle Sidebar | Background task |
| Ctrl+P | Quick Open | Model picker |
| Ctrl+R | Open Recent | Search history |
| Ctrl+F | Find in Terminal | Navigation |
Already Resolved
Section titled “Already Resolved”CodeForge pre-configures Ctrl+P and Ctrl+F to pass through to Claude Code via terminal.integrated.commandsToSkipShell in devcontainer.json:
"terminal.integrated.commandsToSkipShell": [ "-workbench.action.quickOpen", "-workbench.action.terminal.focusFind"]The - prefix removes the shortcut from VS Code’s interception list when the terminal is focused.
Resolving Other Conflicts
Section titled “Resolving Other Conflicts”Option 1: Use Alt Variants
Section titled “Option 1: Use Alt Variants”Claude Code binds Alt (Meta) variants for all shortcuts. Use Alt+G instead of Ctrl+G, and so on. No configuration needed.
Option 2: Add to VS Code’s Skip List
Section titled “Option 2: Add to VS Code’s Skip List”Add more shortcuts to terminal.integrated.commandsToSkipShell in devcontainer.json:
"terminal.integrated.commandsToSkipShell": [ "-workbench.action.quickOpen", "-workbench.action.terminal.focusFind", "-workbench.action.gotoLine", "-workbench.action.files.save"]Common command IDs:
| Shortcut | VS Code Command ID |
|---|---|
| Ctrl+G | workbench.action.gotoLine |
| Ctrl+S | workbench.action.files.save |
| Ctrl+T | workbench.action.showAllSymbols |
| Ctrl+O | workbench.action.files.openFile |
| Ctrl+B | workbench.action.toggleSidebarVisibility |
| Ctrl+R | workbench.action.openRecent |
Option 3: Custom Claude Code Keybindings
Section titled “Option 3: Custom Claude Code Keybindings”Edit .codeforge/config/keybindings.json to remap Claude Code actions to non-conflicting shortcuts:
{ "bindings": [ { "key": "ctrl+shift+g", "command": "chat:externalEditor", "description": "Open external editor (remapped from Ctrl+G)" }, { "key": "ctrl+shift+s", "command": "chat:stash", "description": "Stash conversation (remapped from Ctrl+S)" } ]}The keybindings file is deployed to ~/.claude/keybindings.json on container start via file-manifest.json.
Claude Code Shortcut Reference
Section titled “Claude Code Shortcut Reference”Full list of default Claude Code shortcuts (these work when Claude Code has terminal focus):
| Key | Action |
|---|---|
| Ctrl+C / Esc | Cancel / Interrupt |
| Ctrl+L | Clear screen |
| Ctrl+P | Model picker |
| Ctrl+R | Search history |
| Ctrl+G | External editor |
| Ctrl+S | Stash conversation |
| Ctrl+T | Toggle todos |
| Ctrl+O | Toggle transcript |
| Ctrl+B | Background current task |
| Ctrl+F | Find in output |
All of these also have Alt (Meta) variants that work even when VS Code intercepts the Ctrl version.
Related
Section titled “Related”- Configuration — settings.json and file-manifest reference
- Hooks — lifecycle hooks that can be customized
- Commands — full CLI and slash command reference