What this thread does
Use Ctrl+J for a newline or put remaps in cli.json. Do first (our recommendation): try Ctrl+J; if you need Shift+Enter, check your terminal's key encoding and the current keybind docs.
The problem
Issue 1505 reports that Shift+Enter does nothing with blank input or submits a non-empty message, while Ctrl+J inserts a newline. That is a historical report.
Why it happens
In the issue, rekram1-node says some terminals and multiplexers do not pass Shift+Enter through, so use Ctrl+J or remap the key. A commenter explains that legacy terminals can send the same encoding for Enter and Shift+Enter, so the program cannot distinguish them.
What OpenCode's own docs say
The current keybind docs put terminal keybindings in cli.json under keybinds, and list input.submit as return and input.newline as shift+return, ctrl+return, alt+return and ctrl+j.
The URL https://docs.opencode.ai/docs/keybinds/ now redirects to https://opencode.ai/docs/cli/keybinds/. Our recommendation: use the current page for these current names.
Fixes, from the quickest
The issue's terminal-specific items below are user reports, not universal fixes.
1. Use Ctrl+J for a newline. One commenter reports it in Kitty, iTerm2, Ghostty and Alacritty. Another reports an IDE-panel shortcut conflict in VS Code/Cursor. 2. Remap in cli.json. The current docs use keybinds in cli.json; do not apply the older issue's generic configuration advice without checking your version. 3. Ghostty: rekram1-node says (relaying what he had been told) that a Shift+Enter keybind sending escape plus carriage return was most likely added by Claude Code and breaks Shift+Enter in OpenCode. Commenters who removed that line report resolving the OpenCode symptom but losing the Claude Code behavior. A later comment by kommander says the original Ghostty issue should be resolved. Our recommendation: inspect the existing binding before changing it. 4. tmux: set -s extended-keys on is a commenter's reported workaround with Ghostty and tmux; another also sets terminal-features. That commenter later withdrew both settings after OpenCode 1.0 and used explicit Ghostty/tmux key sequences instead. Treat these as conflicting historical reports. 5. VS Code or Cursor terminal: a commenter adds a keybindings.json entry using workbench.action.terminal.sendSequence to send ESC 13 ; 2 u for Shift+Enter when terminalFocus is true. The commenter updated the sequence because the earlier attempt failed mid-line. 6. Alacritty or iTerm2: commenters map Shift+Return to a newline character, or to the escape sequence [13;2u in iTerm2 profile keys. [The iTerm2 commenter later reported that the custom binding was no longer needed. 7. Warp on macOS: an older commenter suggests remapping Shift+Enter to Ctrl+J only when Warp is focused with Karabiner-Elements. Warp's contributor announcement says release v0.2026.02.04.08.20.stable_02 supports the Kitty keyboard protocol. Do not treat the old report as a current claim that Warp lacks that protocol. A later Warp user report still describes Shift+Enter submitting after installing updates to Warp and OpenCode.
Caveats
Our recommendation: check the terminal, multiplexer and OpenCode version before choosing a workaround.
Sources
- Current keybinds: configuration and default submit/newline keys.
- Issue 1505 and comments: historical reports.
- Warp contributor announcement.
Not for: OpenCode clipboard failures; see opencode-copy-to-clipboard-linux-xclip-tmux-osc52
Started from a post by @bluenex, packaged by the editor. Original post