GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [FEATURE]: Allow to Shift + enter to edit in next line without enter · Issue #9836 · anomalyco/opencode

[FEATURE]: Allow to Shift + enter to edit in next line without enter #9836

New issue
Copy link
New issue
Copy link
Closed
Closed
[FEATURE]: Allow to Shift + enter to edit in next line without enter#9836
Copy link
Assignees
rekram1-node

Description

@jtorrex
jtorrex
opened on Jan 21, 2026
Issue body actions

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem: When composing multi-line messages in Opencode, pressing Enter sends the message immediately, making it difficult to write formatted code blocks or multi-line responses without using workarounds.

Requested Feature: Add support for Shift+Enter to insert a new line while keeping Enter as the send command.

Use Cases:

  • Writing multi-line code examples
  • Formatting markdown with line breaks
  • Composing structured explanations with paragraphs
  • Pasting code snippets with proper formatting

Expected Behavior:

  • Enter → Send message (current behavior)
  • Shift+Enter → Insert new line (new behavior)

This pattern is common in CLI tools and chat interfaces (e.g., ChatGPT, Discord, Slack) and would improve the user experience for composing complex multi-line content.

Reacted by Bartosz Dolewski, Roman Kholiavko, Konrad Stępień, Jordan Fjellman, Pablo Lozano, Kyle Connolly, Konstantinos Kalyfommatos, Vitaly Baum, Cedric Ahlers, Eric Bizet and 65 more
Reacted by Sureal Cereal, Paul Hawxby, Ibnu JA, pavarut, stewacide and Jorgemdss

Activity

Next
  1. jtorrex
    added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 21, 2026
  2. github-actions
    assigned
    rekram1-node
    on Jan 21, 2026
  3. github-actions
    added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Jan 21, 2026
  4. github-actions commented on Jan 21, 2026

    @github-actions
    github-actionsBot
    on Jan 21, 2026 – with GitHub Actions
    Contributor
    More actions

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

    • Keyboard shortcuts to edit prompts suck so much! #4938: Keyboard shortcuts to edit prompts suck so much! - Specifically mentions shift+enter not working for new lines
    • shift+enter keybinding not working #1505: shift+enter keybinding not working - Documents that shift+enter doesn't insert newlines as expected
    • Line breaks do not work any more in the latest version #4189: Line breaks do not work any more in the latest version - Reports shift+enter sending message instead of creating line breaks
    • Keybinds #4997: Keybinds - Pinned issue documenting multiline input (shift+enter, ctrl+enter) as a known keybind issue

    Feel free to ignore if none of these address your specific case.

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

  5. rekram1-node commented on Jan 21, 2026

    @rekram1-node
    rekram1-node
    on Jan 21, 2026
    Member
    More actions

    need to know your terminal, this should already work unless:

    • your terminal doesnt support it
    • your terminal needs to have configured modifiers so the tui can actually intepret it as a shift enter instead of enter
  6. ImTheDeveloper commented on Jan 21, 2026

    @ImTheDeveloper
    ImTheDeveloper
    on Jan 21, 2026
    More actions

    FWIW I upgraded ubuntu to 25.1 and seemingly this keybind broke completely in ghostty. After some digging it needed this added into ghostty config:

    keybind = shift+enter=text:\x1b\r
    

    Reload of terminal and opencode and it all worked again. This has been reported a few times on claudecode also with the same changes needed.

    Reacted by Khalid Alansary and Fernando
  7. diddletime commented on Jan 21, 2026

    @diddletime
    diddletime
    on Jan 21, 2026
    More actions

    I tried this on multiple different terminals on windows but doesn't work at all. I thought I was going crazy because I thought it was strange that opencode missed a simple and important feature like this but I guess it's just broken or the terminals fault.

  8. rekram1-node commented on Jan 21, 2026

    @rekram1-node
    rekram1-node
    on Jan 21, 2026
    Member
    More actions

    @diddletime did u see this?

    https://opencode.ai/docs/keybinds/#windows-terminal

    Reacted by Martin, Ben Wendell, panyann, Xiuqi Zhang, Ediongsenyene Joseph and Elvynia
  9. mrt181 commented on Jan 22, 2026

    @mrt181
    mrt181
    on Jan 22, 2026
    More actions

    @diddletime did u see this?

    https://opencode.ai/docs/keybinds/#windows-terminal

    this works for me with windows-terminal -> WSL2 -> tmux -> fish

  10. bdolewski-intellias commented on Jan 22, 2026

    @bdolewski-intellias
    bdolewski-intellias
    on Jan 22, 2026
    More actions

    The Shift+Enter for multiline doesn't work for me. I've got the same issue just like OP. My setup:

    • macOS: 26.2 (Build 25C56)
    • OpenCode: 1.1.31
    • Warp: 0.2026.01.14.08.15.04
    Reacted by Konrad Stępień, Minje Park, Eric Bizet, Ulises, userX570, Mark Macdonald, Renat and Dimitar Nizamov
  11. kstepien3 commented on Jan 27, 2026

    @kstepien3
    kstepien3
    on Jan 27, 2026
    More actions

    The Shift+Enter for multiline doesn't work for me. I've got the same issue just like OP. My setup:

    * **macOS**: 26.2 (Build 25C56)
    
    * **OpenCode**: 1.1.31
    
    * **Warp**: 0.2026.01.14.08.15.04
    

    same here. I don’t see any issue in implementing it, or even adding an option for users to test it.

  12. u1pns commented on Jan 27, 2026

    @u1pns
    u1pns
    on Jan 27, 2026
    More actions

    Same issue on OnMacOS. I have to use CTRL+J.

    Reacted by Konrad Stępień, Mathias Minacapilli, Daniel, Kyle Connolly, Vitaly Baum, Cedric Ahlers, Kasia Zadurska, etuardu, Nsoromma, BhEaN and 12 more
    Reacted by Rafael A. Bolanos, hivakurd, mmohamedbh, Arvind, Charlie Dixon, Bruno Jyun Kometani and Tamiya
  13. kstepien3 commented on Jan 27, 2026

    @kstepien3
    kstepien3
    on Jan 27, 2026
    More actions

    Same issue on OnMacOS. I have to use CTRL+J.

    I wasn’t aware of that. Thanks.

  14. kyconnol commented on Feb 5, 2026

    @kyconnol
    kyconnol
    on Feb 5, 2026
    More actions

    Same issue on OnMacOS. I have to use CTRL+J.

    Thank you for this! In case anyone's like me and remaps caps lock to ctrl - new line is working for me in Ghostty/Tmux on MacOS with:

    ctrl (physical caps lock) + shift + j

    Reacted by Fabio M. Costa
  15. XavierBeheydt commented on Feb 11, 2026

    @XavierBeheydt
    XavierBeheydt
    on Feb 11, 2026
    More actions

    I have the same issue on :

    • Archlinux
    • Alacritty: v0.16.1 (42f49eeb)
    • Tmux: 3.6a
    Reacted by Philip Wales and Anil Kulkarni
  16. 65 remaining items

  17. AyaSapphire commented on Jul 29, 2026

    @AyaSapphire
    AyaSapphire
    on Jul 29, 2026
    More actions

    @diddletime did u see this?

    https://opencode.ai/docs/keybinds/#windows-terminal

    I think the current solution described in the documentation has some side effects on Windows Terminal. Configuring Shift+Enter this way is effectively a "dirty workaround", as it overrides the terminal's existing key behavior. For terminals like PowerShell, Shift+Enter already works as a way to input multi-line commands.

    After applying the suggested configuration, however, Shift+Enter no longer behaves correctly and may insert literal characters such as [13;2u12 instead.

    It would be helpful if the documentation could mention this limitation, so users understand that this configuration may affect the default multi-line input behavior of some terminals.

  18. stewacide commented on Sep 26, 2026

    @stewacide
    stewacide
    on Sep 26, 2026
    More actions

    This so much. Find this very annoying switching from Cursor to OpenCode (which has the option for Enter to submit or Enter for newline)

    Image
  19. neriousy commented on Oct 1, 2026

    @neriousy
    neriousy
    on Oct 1, 2026
    Member
    More actions

    In OpenCode v2, Shift+Enter inserts a new line by default. input.newline defaults to shift+return, ctrl+return, alt+return and ctrl+j.

    Added in #41882; alt+return came in #43655.

    Some terminals don't send a separate Shift+Enter key sequence. For those, see https://opencode.ai/docs/keybinds/ and the keybind tracking issue #4997.

    Closing as completed.

    Reacted by Denny and Konrad Stępień
  20. neriousy
    closed this as completedon Oct 1, 2026
  21. serhumanos commented on Oct 4, 2026

    @serhumanos
    serhumanos
    on Oct 4, 2026
    More actions

    This will be very useful; in most cases, I hit Enter to add a new line.

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

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.