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 #9836DescriptionFeature 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 Activitygithub-actions commented on Jan 21, 2026 This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
For keybind-related issues, please also check our pinned keybinds documentation: #4997 rekram1-node commented on 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
ImTheDeveloper commented on 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. Reacted by Khalid Alansary and Fernando diddletime commented on 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. rekram1-node commented on Jan 21, 2026 Reacted by Martin, Ben Wendell, panyann, Xiuqi Zhang, Ediongsenyene Joseph and Elvynia mrt181 commented on Jan 22, 2026 bdolewski-intellias commented on 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
Reacted by Konrad Stępień, Minje Park, Eric Bizet, Ulises, userX570, Mark Macdonald, Renat and Dimitar Nizamov kstepien3 commented on 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. u1pns commented on Jan 27, 2026 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 kstepien3 commented on Jan 27, 2026
Same issue on OnMacOS. I have to use CTRL+J.
I wasn’t aware of that. Thanks. kyconnol commented on Feb 5, 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 Reacted by Fabio M. Costa XavierBeheydt commented on Feb 11, 2026 I have the same issue on :
- Archlinux
- Alacritty: v0.16.1 (42f49eeb)
- Tmux: 3.6a
Reacted by Philip Wales and Anil Kulkarni AyaSapphire commented on Jul 29, 2026
@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. stewacide commented on Sep 26, 2026 This so much. Find this very annoying switching from Cursor to OpenCode (which has the option for Enter to submit or Enter for newline)
 neriousy commented on Oct 1, 2026 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ń serhumanos commented on Oct 4, 2026 This will be very useful; in most cases, I hit Enter to add a new line.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|