Skip to content
Docs

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.

When the terminal is focused, VS Code intercepts these shortcuts before Claude Code can process them:

ShortcutVS Code ActionClaude Code Action
Ctrl+GGo to LineExternal editor
Ctrl+SSave FileStash conversation
Ctrl+TOpen SymbolToggle todos
Ctrl+OOpen FileToggle transcript
Ctrl+BToggle SidebarBackground task
Ctrl+PQuick OpenModel picker
Ctrl+ROpen RecentSearch history
Ctrl+FFind in TerminalNavigation

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.

Claude Code binds Alt (Meta) variants for all shortcuts. Use Alt+G instead of Ctrl+G, and so on. No configuration needed.

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:

ShortcutVS Code Command ID
Ctrl+Gworkbench.action.gotoLine
Ctrl+Sworkbench.action.files.save
Ctrl+Tworkbench.action.showAllSymbols
Ctrl+Oworkbench.action.files.openFile
Ctrl+Bworkbench.action.toggleSidebarVisibility
Ctrl+Rworkbench.action.openRecent

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.

Full list of default Claude Code shortcuts (these work when Claude Code has terminal focus):

KeyAction
Ctrl+C / EscCancel / Interrupt
Ctrl+LClear screen
Ctrl+PModel picker
Ctrl+RSearch history
Ctrl+GExternal editor
Ctrl+SStash conversation
Ctrl+TToggle todos
Ctrl+OToggle transcript
Ctrl+BBackground current task
Ctrl+FFind in output

All of these also have Alt (Meta) variants that work even when VS Code intercepts the Ctrl version.

  • Configuration — settings.json and file-manifest reference
  • Hooks — lifecycle hooks that can be customized
  • Commands — full CLI and slash command reference