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
How do you insert a new line into the prompt box? (using mac + ghostty) #2820
For some reason, I can't introduce a line break in my input. Tried Ctrl + enter, Opt + enter, Cmd + enter - no luck. How do I type over multiple lines?
Tried in both ghostty and vs code terminal.
Able to do an Opt + Enter for line break in gemini-cli and claude-code successfully in the same environment.
This issue might be a duplicate of existing issues. Please check:
shift+enter keybinding not working #1505: shift+enter keybinding not working - This issue describes similar problems with multiline input where shift+enter doesn't work to insert newlines, though it mentions ctrl+j works as an alternative
Feel free to ignore if none of these address your specific case.
Reacted by melnady-freelancer, Oleksii Lukin, Johan Ziruo Ye, mohamed-elnady, Malte Hellmeier, Kerim Hudayberdiyev, skyracer2012, R. N. West (Nat), endolith and Alex Holloway
@epicwhale hmm works fine on my end, there could be other things in your system interfering?, I heard people using tmux have this often.
Alternatives:
try cmd + j
use the "keybinds" in your config to remap it
Reacted by Patrick Igiraneza, Pasindu Ruwandeniya, Andrew Repp, devhindo, Bohdan Vereshchak, Simon Desdevises, Mateus Sampaio, Jason Parker, Vijay Rana, robert. and 15 more
Reacted by Phil Reynolds, Nahuel Gomez Suarez, Anomatomato, Müslüm Barış Korkmazer, voejo, Abdellatif Laghjaj 🇵🇸, federicogerardi and endolith
@rekram1-node not using tmux. Oddly works in Claude code and Gemini CLI.. so I can't imagine what in the system would be intefering. The + j combination key works, but really find that unusual. Want a combo with enter.. struggling with getting a keybind to fix it too, sadly :(
@epicwhale hmm works fine on my end, there could be other things in your system interfering?, I heard people using tmux have this often.
@rekram1-node okay so oddly with the keybind above, ctrl+enter works in Ghostty (but shift+enter does not), and neither of the two keybinds work in VS Code terminal.
Activity
github-actions commentedon Sep 27, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Sep 27, 2025
@epicwhale have u tried shift + enter?
that is what i use and it should be the default
epicwhale commentedon Sep 27, 2025
Yes, sadly, does not work. Shift Enter simply sends the command. You will see this reported in other similar bugs mentioned too.
epicwhale commentedon Sep 27, 2025
@rekram1-node shift enter not working reported by another user too, same boat: #1505 (comment)
rekram1-node commentedon Sep 27, 2025
@epicwhale hmm works fine on my end, there could be other things in your system interfering?, I heard people using tmux have this often.
Alternatives:
epicwhale commentedon Sep 27, 2025
@rekram1-node not using tmux. Oddly works in Claude code and Gemini CLI.. so I can't imagine what in the system would be intefering. The + j combination key works, but really find that unusual. Want a combo with enter.. struggling with getting a keybind to fix it too, sadly :(
rekram1-node commentedon Sep 27, 2025
hm there may be something weird on our end then, not sure I haven’t been able to replicate this.
once the tui rewrite is done some key captures may perform better so I hope this will be addressed by the rewrite
rekram1-node commentedon Sep 27, 2025
For now I am going to close as duplicate of #1505
what keybind did you try to remap it to?
epicwhale commentedon Sep 27, 2025
@rekram1-node here's what I tried in ~/.config/opencode/opencode.json
did I get something wrong?
epicwhale commentedon Sep 27, 2025
@rekram1-node okay so oddly with the keybind above, ctrl+enter works in Ghostty (but shift+enter does not), and neither of the two keybinds work in VS Code terminal.
rekram1-node commentedon Sep 27, 2025
weird, so the vscode one doesn’t surprise me because their app will try to capture some of the bindings
once the migration is complete I think we can address these better, rn it is an annoying issue so I apologize
epicwhale commentedon Sep 28, 2025
Thanks for the replies and trying to troubleshoot! May I ask out of curiosity when is this TUI migration expected? Looks like a major overhaul!
rekram1-node commentedon Sep 28, 2025
I am thinking it should be done within a week or two but I can’t say for sure, you can track progress here: #2685
11 remaining items
thunderkid commentedon Jan 27, 2026
alt+enter works in linux/kde/alacritty. other suggestions don't.
gitTerebi commentedon Jan 27, 2026
alt+enter worked for me too in webstorm using the opencode plugin.
Koleok commentedon Feb 2, 2026
alt(opt)+enter working on mac/ghostty/tmux. Would loooove vim keybinds in this input.
darkBuddha commentedon Feb 4, 2026
Guys. How can this not be fixed (macOS)
LeonardoBerlatto commentedon Feb 5, 2026
Running it in warp and Ctrl+J works.
Can we please fix to shift enter to work? 🙏
ajihsan commentedon Feb 6, 2026
Using Option + Return works for me on Mac.
joaobibiano commentedon Feb 20, 2026
For anyone hitting this on Alacritty, adding this to your
~/.config/alacritty/alacritty.tomlfixes it:This forces Alacritty to emit the Kitty keyboard protocol sequence for Shift+Enter. Restart Alacritty after applying.
AlKhrulev commentedon Feb 24, 2026
Can confirm, this also works for me on Mac inside tmux
vaspoz commentedon Mar 3, 2026
seems the issue with Warp only - doesn't work.. Ctrl+J works, but it's not convenient
fix777 commentedon Mar 26, 2026
For anyone encountering this issue with Ghostty on macOS, add the following to your Ghostty configuration:
iiw commentedon May 1, 2026
Ctrl+J works for me too.
anggaaryas commentedon May 17, 2026
Both shift + return and opt + return doesnt work in mac default terminal.
thomasccpereira commentedon May 19, 2026
shift + enter/ctrl + enter/option + enter/cmd + enterdon't work usingopencodein the mac terminal.alisedighi commentedon Jul 28, 2026
ctrl+x (leader key) once. ctrl+j to add new line
key binding
bukit-kronik commentedon Jul 30, 2026
ctrl + shift + enter for windows