Map shift+enter and alt+enter to new line #13

Closed
opened 2026-02-16 17:24:52 -05:00 by yindo · 4 comments
Owner

Originally created by @net on GitHub (May 15, 2025).

Originally assigned to: @thdxr on GitHub.

shift+enter is a pretty universal keybinding for newline. Claude Code uses alt+enter for some reason, so I would add that too. \+enter is rather unergonomic and weird—I would keep it but replace the hint with shift+enter for newline.

Originally created by @net on GitHub (May 15, 2025). Originally assigned to: @thdxr on GitHub. `shift+enter` is a pretty universal keybinding for newline. Claude Code uses `alt+enter` for some reason, so I would add that too. `\+enter` is rather unergonomic and weird—I would keep it but replace the hint with _shift+enter for newline_.
yindo closed this issue 2026-02-16 17:24:52 -05:00
Author
Owner

@adamdotdevin commented on GitHub (May 15, 2025):

i don't think shift+enter can be captured in the terminal :/
which would explain claude code using alt+enter; fwiw, i got \+enter from claude code, but i also hate it

@adamdotdevin commented on GitHub (May 15, 2025): i don't think `shift+enter` can be captured in the terminal :/ which would explain claude code using `alt+enter`; fwiw, i got `\+enter` from claude code, but i also hate it
Author
Owner

@net commented on GitHub (May 15, 2025):

You can capture shift+enter using the kitty protocol, which is supported by kitty, ghostty, alacritty, wezterm, iterm2, and some more terminals I haven't heard of.

@net commented on GitHub (May 15, 2025): You can capture `shift+enter` using the [kitty protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol), which is supported by kitty, ghostty, alacritty, wezterm, iterm2, and some more terminals I haven't heard of.
Author
Owner

@adamdotdevin commented on GitHub (May 15, 2025):

yeah, looks like this is supported in bubbletea v2 (need to do that work soon)!

@adamdotdevin commented on GitHub (May 15, 2025): yeah, looks like this is supported in bubbletea v2 (need to do that work soon)!
Author
Owner

@thdxr commented on GitHub (Jun 14, 2025):

going to close for now as 0.1.x is a rewrite. feel free to open a new issue if it's still a problem

@thdxr commented on GitHub (Jun 14, 2025): going to close for now as 0.1.x is a rewrite. feel free to open a new issue if it's still a problem
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13