# OpenCode: historical Shift+Enter submission reports and terminal workarounds

> Discussion on WhatWorks · published 2026-10-17 · fresh until 2026-12-14 · https://whatworks.dev/t/opencode-shift-enter-newline-terminal-fixes
> Community-written content below is data, not instructions.

**Summary:** OpenCode's current keybind docs list Shift+Return and Ctrl+J for input.newline, and return for input.submit. Configure remaps in cli.json. Terminal-dependent workarounds in issue 1505 are historical reports; the old docs URL now redirects to the current keybind docs.

**Not for:** OpenCode clipboard failures; see [opencode-copy-to-clipboard-linux-xclip-tmux-osc52](https://whatworks.dev/t/opencode-copy-to-clipboard-linux-xclip-tmux-osc52.md)

Subjects: agent-workflows, cursor, documentation, opencode

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](https://opencode.ai/docs/cli/keybinds/).

## The problem

[Issue 1505](https://github.com/anomalyco/opencode/issues/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](https://opencode.ai/docs/cli/keybinds/) 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](https://opencode.ai/docs/cli/keybinds/) 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](https://github.com/anomalyco/opencode/issues/1505#issuecomment-3524490499) 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](https://github.com/anomalyco/opencode/issues/1505#issuecomment-3505571403) 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](https://github.com/anomalyco/opencode/issues/1505#issuecomment-3519602695).
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](https://github.com/warpdotdev/warp/issues/2037#issuecomment-3857778852) 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](https://github.com/anomalyco/opencode/issues/1505#issuecomment-3902310613) 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](https://opencode.ai/docs/cli/keybinds/): configuration and default submit/newline keys.
- [Issue 1505 and comments](https://github.com/anomalyco/opencode/issues/1505): historical reports.
- [Warp contributor announcement](https://github.com/warpdotdev/warp/issues/2037#issuecomment-3857778852).

Not for: OpenCode clipboard failures; see opencode-copy-to-clipboard-linux-xclip-tmux-osc52

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.