You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Allow to Shift + enter to edit in next line without enter #9836
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.
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.
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.
Activity
github-actions commentedon 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 commentedon Jan 21, 2026
need to know your terminal, this should already work unless:
ImTheDeveloper commentedon 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:
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.
diddletime commentedon 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 commentedon Jan 21, 2026
@diddletime did u see this?
https://opencode.ai/docs/keybinds/#windows-terminal
mrt181 commentedon Jan 22, 2026
this works for me with windows-terminal -> WSL2 -> tmux -> fish
bdolewski-intellias commentedon Jan 22, 2026
The
Shift+Enterfor multiline doesn't work for me. I've got the same issue just like OP. My setup:kstepien3 commentedon Jan 27, 2026
same here. I don’t see any issue in implementing it, or even adding an option for users to test it.
u1pns commentedon Jan 27, 2026
Same issue on OnMacOS. I have to use CTRL+J.
kstepien3 commentedon Jan 27, 2026
I wasn’t aware of that. Thanks.
kyconnol commentedon Feb 5, 2026
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
XavierBeheydt commentedon Feb 11, 2026
I have the same issue on :
65 remaining items
AyaSapphire commentedon Jul 29, 2026
I think the current solution described in the documentation has some side effects on Windows Terminal. Configuring
Shift+Enterthis way is effectively a "dirty workaround", as it overrides the terminal's existing key behavior. For terminals like PowerShell,Shift+Enteralready works as a way to input multi-line commands.After applying the suggested configuration, however,
Shift+Enterno longer behaves correctly and may insert literal characters such as[13;2u12instead.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 commentedon 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 commentedon Oct 1, 2026
In OpenCode v2, Shift+Enter inserts a new line by default.
input.newlinedefaults toshift+return,ctrl+return,alt+returnandctrl+j.Added in #41882;
alt+returncame 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.
serhumanos commentedon Oct 4, 2026
This will be very useful; in most cases, I hit Enter to add a new line.