opencode
opencode copied to clipboard
feat: Add option to disable mouse capture in TUI for better terminal multiplexer compatibility
Description
When running OpenCode inside terminal multiplexers like Zellij or tmux, the TUI's mouse capture prevents normal copy operations:
- Mouse selection - captured by TUI, can't use native terminal selection
- Ctrl+C - exits OpenCode instead of copying selected text
While Shift+mouse works as a workaround in some terminals, this is not intuitive and doesn't work consistently across all setups.
Proposal
Add a configuration option to disable mouse capture entirely:
// opencode.json
{
"tui": {
"mouse": false
}
}
Or via environment variable:
OPENCODE_DISABLE_MOUSE=true opencode
Rationale
OpenCode TUI doesn't heavily rely on mouse interactions - the primary workflow is keyboard-driven. Users who prefer mouse-based text selection over TUI mouse features should have the option to disable capture.
Environment
- Terminal: Zellij / tmux
- OS: Linux
- OpenCode version: latest