You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
The keybindings ctrl+p to see commands doesn't work on my VSCode setup. On my setup, ctrl+p is mapped to go to file but the when condition is empty. I guess, there will be a condition to add to avoid running this keybinding when on a terminal or in the opencode extension. Any ideas how to do this ? Thanks
Reacted by MPela, Zhen Wang, Jeongjin Shin, trunghoang-synergieglobal, Borkesz Máté, Gary Wang, Hans-Georg Winkler, xob0t, Jaen, Morgan Marshall and 18 more
The core issue here is that VSCode's built-in ctrl+p (Go to File) command is taking precedence over the OpenCode extension's keybinding. This is a known challenge with VSCode extension keybindings where the when condition needs to be properly configured to ensure the extension's keybind only triggers in the appropriate context.
FYI since Quick Open in VSCode can be activated with many different keys (eg. Ctrl+E or Ctrl+Shift+P & Backspace), one workaround is to just disable the Ctrl+P shortcut in terminals.
Why doesn't use /settings or something like other tools?
Reacted by Sanaulla Haq, Alejandro, Richard Jedlička, Bregwin Jogi, garar, Alex B, Alexander Priyomko, Martin Honermeyer, Luiz Alves, Kalin Chernev and 8 more
fwiw, vscode is wildly anti-terminal in terms of consuming commonly used terminal keys. but sure, a /settings or similar sounds like a complementary command to have.
Solution: Resolving VS Code and OpenCode Terminal Keybinding Conflicts
The issue occurs because VS Code globally intercepts certain shortcuts — such as Ctrl+P (Go to File) and Ctrl+F (Find) — even when the terminal is focused. This prevents CLI/TUI applications running in your terminal, like OpenCode, from receiving those inputs.
To fix this, you can configure VS Code to bypass its global shortcuts and pass those keys directly to the active terminal shell.
Solution: Update your VS Code settings.json
The cleanest way to fix this is to add the conflicting commands to the terminal.integrated.commandsToSkipShell array with a minus - prefix. This instructs VS Code to skip its own internal command when the terminal is active.
Open the Command Palette in VS Code (Ctrl+Shift+P or Cmd+Shift+P on macOS).
Type and select: Preferences: Open User Settings (JSON).
Paste the following configuration block inside the outer curly braces { } of your settings.json:
Activity
github-actions commentedon Dec 27, 2025
For keybind-related issues, please also check our pinned keybinds documentation: #4997
This issue might be related to existing issues about keybind conflicts and configuration:
ctrl+x leftshortcut for switching to sub agent session is not present inctrl+pcommands menu #5706:ctrl+pshortcuts not present in commands menusession_interruptcommand doesn't work when binded in non-default #5752: Keybinding doesn't work when bound to non-default configurationThe core issue here is that VSCode's built-in
ctrl+p(Go to File) command is taking precedence over the OpenCode extension's keybinding. This is a known challenge with VSCode extension keybindings where thewhencondition needs to be properly configured to ensure the extension's keybind only triggers in the appropriate context.altendky commentedon Jan 8, 2026
yeah, everything is going to collide with something in vscode it seems... i reconfigured mine to map to ctrl+o to get around this conflict.
jaens commentedon Feb 1, 2026
FYI since Quick Open in VSCode can be activated with many different keys (eg. Ctrl+E or Ctrl+Shift+P & Backspace), one workaround is to just disable the Ctrl+P shortcut in terminals.
Add the following to
keybindings.json:{ "key": "ctrl+p", "command": "workbench.action.quickOpen", "when": "!terminalFocus", }, { "key": "ctrl+p", "command": "-workbench.action.quickOpen", },remkolems commentedon Feb 13, 2026
GUI mode also available.
See also https://code.visualstudio.com/docs/configure/keybindings.
My default keyboard mapping
Ctrl+pwas set toGo to File...(same command was also provided byCtrl+e). So I simply removed theCtrl+pmapping.Use right mouse menu option

Change when expressionto alter the expression state. e.g. with!terminalFocus:ShiinaManatsu commentedon Mar 17, 2026
The same as esc
{ "key": "esc", "command": "workbench.action.quickOpen", "when": "!terminalFocus", }, { "key": "esc", "command": "-workbench.action.quickOpen", },easyfrog commentedon Apr 5, 2026
Why doesn't use
/settingsor something like other tools?Shyryp commentedon Apr 27, 2026
Seriously, make it possible to access settings via /settings. Using hotkeys is inconvenient and incorrect for many IDEs.
astrojuanlu commentedon May 7, 2026
Or
ctrl+x ,?altendky commentedon May 7, 2026
fwiw, vscode is wildly anti-terminal in terms of consuming commonly used terminal keys. but sure, a
/settingsor similar sounds like a complementary command to have.ameerhamzakhanDev commentedon Jun 2, 2026
Solution: Resolving VS Code and OpenCode Terminal Keybinding Conflicts
The issue occurs because VS Code globally intercepts certain shortcuts — such as
Ctrl+P(Go to File) andCtrl+F(Find) — even when the terminal is focused. This prevents CLI/TUI applications running in your terminal, like OpenCode, from receiving those inputs.To fix this, you can configure VS Code to bypass its global shortcuts and pass those keys directly to the active terminal shell.
Solution: Update your VS Code
settings.jsonThe cleanest way to fix this is to add the conflicting commands to the
terminal.integrated.commandsToSkipShellarray with a minus-prefix. This instructs VS Code to skip its own internal command when the terminal is active.Ctrl+Shift+PorCmd+Shift+Pon macOS).{ }of yoursettings.json:{ "terminal.integrated.commandsToSkipShell": [ "-workbench.action.quickOpen", // Fixes ctrl+p and ctrl+e "-workbench.action.toggleSidebarVisibility", // Fixes ctrl+b "-workbench.action.togglePanel", // Fixes ctrl+j (hides terminal) "-workbench.action.quickOpenRecent", // Fixes ctrl+r "-workbench.action.showAllSymbols", // Fixes ctrl+t "-actions.find", // Fixes ctrl+f "-workbench.action.terminal.focusFind", // Fixes ctrl+f inside terminal "-workbench.action.gotoLine", // Fixes ctrl+g "-workbench.action.closeActiveEditor", // Fixes ctrl+w (closes tab) "-workbench.action.terminal.killEditor", // Fixes ctrl+w in editor terminals "-editor.action.selectAll", // Fixes ctrl+a "-workbench.action.files.newUntitledFile", // Fixes ctrl+n "-editor.action.quickFix", // Fixes ctrl+. "-workbench.action.zoomOut", // Fixes ctrl+- "-editor.action.rename" // Fixes f2 ], "terminal.integrated.allowChords": false // Prevents ctrl+k from waiting for a second chord key }rekram1-node commentedon Jun 23, 2026
Automated: closing question issues.
GitHub Issues are for bug reports and feature requests only — questions / support are no longer tracked here.
If this is a bug or feature request, please open a new issue with the appropriate template.