Skip to content

tui: Shift+Enter submits instead of inserting a newline #43222

Closed

Description

@MohammadKanaan

Summary

In the opencode prompt input, Shift+Enter submits the message instead of
inserting a newline. Since plain Enter also submits, there is currently no
way to enter multi-line prompts, which significantly limits prompt formatting.

Environment

  • opencode version: 1.18.18
  • OS: Darwin 24.6.0 (darwin arm64)
  • Terminal: Ghostty; TERM=xterm-256color; COLORTERM=truecolor
  • Shell: /bin/zsh
  • Install/channel: Release channel appears likely; exact channel unavailable
  • Active plugins: @knikolov/opencode-plugin-simple-memory; no local workspace
    plugin files found

Reproduction

  1. Open opencode and focus the prompt input.
  2. Type text.
  3. Press Shift+Enter.
  4. Observe that the message is submitted instead of a newline being inserted.

Expected Behavior

Enter should submit the prompt, while Shift+Enter should insert a newline
without submitting the message.

Actual Behavior

Both Enter and Shift+Enter submit the prompt. There is no available keyboard
shortcut for inserting a newline.

Additional Context

  • Reproducible consistently.
  • This behavior has existed since opencode was first installed.
  • No recent opencode, terminal, configuration, or plugin change is known.
  • The issue prevents composing multi-line prompts.

Activity

  1. github-actions commented on Aug 18, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    For keybind-related issues, please also check our pinned keybinds documentation: #4997

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions