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
{{ message }}
Repository navigation
VSCode extension: keyboard shortcuts (/, ctrl+p, ctrl+b, etc.) not working in webview panel #26519
When using the OpenCode VSCode extension (not the terminal/TUI version),
keyboard shortcuts defined by OpenCode do not work because VS Code intercepts
them before they reach the webview panel.
Environment
OpenCode version: (your version)
VS Code version: (your version)
OS: Windows
Shortcuts affected
/ (slash) — intercepted by VS Code comment action
ctrl+p — intercepted by VS Code "Go to File"
ctrl+b — intercepted by VS Code sidebar toggle
ctrl+j — intercepted by VS Code panel toggle
ctrl+r — intercepted by VS Code "Open Recent"
ctrl+z — intercepted by VS Code undo
Steps to reproduce
Install the OpenCode VS Code extension
Open the OpenCode panel
Click inside the OpenCode webview to focus it
Try pressing / or ctrl+p
VS Code handles the shortcut instead of OpenCode
Expected behavior
Shortcuts should be captured by the OpenCode webview when it is focused.
Actual behavior
VS Code intercepts the keypresses and triggers its own commands instead.
Notes
This is a known VS Code webview limitation (microsoft/vscode#129178) but it
can be worked around by the extension using webview keyboard event handling.
Other extensions like Cline and Continue have implemented similar workarounds.
The terminalFocus when-condition does not apply here since the extension uses
a webview panel, not a terminal.
Activity
github-actions commentedon May 9, 2026
This issue might be a duplicate of existing issues. Please check:
ctrl+pin VSCode doesn't work (same symptom — VS Code intercepting ctrl+p instead of OpenCode)For keybind-related issues, please also check our pinned keybinds documentation: #4997
github-actions commentedon Jul 9, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.