Description
Description
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.
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Description
Description
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
Shortcuts affected
Steps to reproduce
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.
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response