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

Open
opened 2026-02-16 18:06:07 -05:00 by yindo · 13 comments
Owner

Originally created by @jtorrex on GitHub (Jan 21, 2026).

Originally assigned to: @rekram1-node on GitHub.

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.

Originally created by @jtorrex on GitHub (Jan 21, 2026). Originally assigned to: @rekram1-node on GitHub. ### Feature hasn't been suggested before. - [x] 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.
yindo added the opentuidiscussion labels 2026-02-16 18:06:07 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 21, 2026):

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

  • #4938: Keyboard shortcuts to edit prompts suck so much! - Specifically mentions shift+enter not working for new lines
  • #1505: shift+enter keybinding not working - Documents that shift+enter doesn't insert newlines as expected
  • #4189: Line breaks do not work any more in the latest version - Reports shift+enter sending message instead of creating line breaks
  • #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

@github-actions[bot] commented on GitHub (Jan 21, 2026): This issue might be a duplicate of existing issues. Please check: - #4938: Keyboard shortcuts to edit prompts suck so much! - Specifically mentions shift+enter not working for new lines - #1505: shift+enter keybinding not working - Documents that shift+enter doesn't insert newlines as expected - #4189: Line breaks do not work any more in the latest version - Reports shift+enter sending message instead of creating line breaks - #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
Author
Owner

@rekram1-node commented on GitHub (Jan 21, 2026):

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
@rekram1-node commented on GitHub (Jan 21, 2026): 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
Author
Owner

@ImTheDeveloper commented on GitHub (Jan 21, 2026):

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.

@ImTheDeveloper commented on GitHub (Jan 21, 2026): 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.
Author
Owner

@diddletime commented on GitHub (Jan 21, 2026):

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.

@diddletime commented on GitHub (Jan 21, 2026): 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.
Author
Owner

@rekram1-node commented on GitHub (Jan 21, 2026):

@diddletime did u see this?

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

@rekram1-node commented on GitHub (Jan 21, 2026): @diddletime did u see this? https://opencode.ai/docs/keybinds/#windows-terminal
Author
Owner

@mrt181 commented on GitHub (Jan 22, 2026):

@diddletime did u see this?

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

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

@mrt181 commented on GitHub (Jan 22, 2026): > [@diddletime](https://github.com/diddletime) did u see this? > > https://opencode.ai/docs/keybinds/#windows-terminal this works for me with windows-terminal -> WSL2 -> tmux -> fish
Author
Owner

@bdolewski-intellias commented on GitHub (Jan 22, 2026):

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
@bdolewski-intellias commented on GitHub (Jan 22, 2026): 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
Author
Owner

@kstepien3 commented on GitHub (Jan 27, 2026):

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.

@kstepien3 commented on GitHub (Jan 27, 2026): > 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.
Author
Owner

@u1pns commented on GitHub (Jan 27, 2026):

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

@u1pns commented on GitHub (Jan 27, 2026): Same issue on OnMacOS. I have to use CTRL+J.
Author
Owner

@kstepien3 commented on GitHub (Jan 27, 2026):

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

I wasn’t aware of that. Thanks.

@kstepien3 commented on GitHub (Jan 27, 2026): > Same issue on OnMacOS. I have to use CTRL+J. I wasn’t aware of that. Thanks.
Author
Owner

@kyconnol commented on GitHub (Feb 4, 2026):

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

@kyconnol commented on GitHub (Feb 4, 2026): > 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
Author
Owner

@XavierBeheydt commented on GitHub (Feb 11, 2026):

I have the same issue on :

  • Archlinux
  • Alacritty: v0.16.1 (42f49eeb)
  • Tmux: 3.6a
@XavierBeheydt commented on GitHub (Feb 11, 2026): I have the same issue on : - **Archlinux** - **Alacritty**: v0.16.1 (42f49eeb) - **Tmux**: 3.6a
Author
Owner

@fabiomcosta commented on GitHub (Feb 15, 2026):

Same issue here, using macos + ghostty + tmux
ctrt + shift + j works, but it would be great to have shift + enter working universaly

@fabiomcosta commented on GitHub (Feb 15, 2026): Same issue here, using macos + ghostty + tmux `ctrt + shift + j` works, but it would be great to have `shift + enter` working universaly
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7080