[BUG] Terminal TUI does not insert a new line with Shift+Enter; only Ctrl+J works #1945

Closed
opened 2026-02-16 17:33:21 -05:00 by yindo · 7 comments
Owner

Originally created by @H0llyW00dzZ on GitHub (Oct 3, 2025).

Originally assigned to: @adamdotdevin on GitHub.

The Terminal TUI does not recognize Shift+Enter as a new line input. Only Ctrl+J successfully inserts a new line.

Here’s a screen recording demonstrating the issue:

https://github.com/user-attachments/assets/112fdbe5-70e4-4fb7-ad04-c8bb8a0ba514

Originally created by @H0llyW00dzZ on GitHub (Oct 3, 2025). Originally assigned to: @adamdotdevin on GitHub. The Terminal TUI does not recognize **Shift+Enter** as a new line input. Only **Ctrl+J** successfully inserts a new line. Here’s a screen recording demonstrating the issue: https://github.com/user-attachments/assets/112fdbe5-70e4-4fb7-ad04-c8bb8a0ba514
yindo closed this issue 2026-02-16 17:33:21 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 3, 2025):

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

  • #2725: /help commands wrap onto next line oddly - mentions input_newline command wrapping, suggesting TUI input handling issues

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 3, 2025): This issue might be a duplicate of existing issues. Please check: - #2725: `/help` commands wrap onto next line oddly - mentions `input_newline` command wrapping, suggesting TUI input handling issues Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Oct 3, 2025):

@H0llyW00dzZ what terminal are you using?

@rekram1-node commented on GitHub (Oct 3, 2025): @H0llyW00dzZ what terminal are you using?
Author
Owner

@H0llyW00dzZ commented on GitHub (Oct 3, 2025):

@H0llyW00dzZ what terminal are you using?

@rekram1-node I'm using the default terminal that comes with Ubuntu 25.04 (Plucky Puffin)—that’s the distro I’ve been using.

@H0llyW00dzZ commented on GitHub (Oct 3, 2025): > [@H0llyW00dzZ](https://github.com/H0llyW00dzZ) what terminal are you using? @rekram1-node I'm using the default terminal that comes with [Ubuntu 25.04 (Plucky Puffin)](https://releases.ubuntu.com/plucky/)—that’s the distro I’ve been using.
Author
Owner

@H0llyW00dzZ commented on GitHub (Oct 3, 2025):

It's GNOME 48

@H0llyW00dzZ commented on GitHub (Oct 3, 2025): It's GNOME 48
Author
Owner

@H0llyW00dzZ commented on GitHub (Oct 3, 2025):

I also found a workaround: if start the line with a backslash (\) and then press Shift+Enter, it works as expected.

Here’s a screen recording demonstrating this:

https://github.com/user-attachments/assets/1b13190f-558d-412b-9ab2-e29eea471db0

It might also be helpful to automatically insert a backslash when Shift+Enter is pressed—consider adding this in a future update.

@H0llyW00dzZ commented on GitHub (Oct 3, 2025): I also found a workaround: if start the line with a backslash (`\`) and then press **Shift+Enter**, it works as expected. Here’s a screen recording demonstrating this: https://github.com/user-attachments/assets/1b13190f-558d-412b-9ab2-e29eea471db0 It might also be helpful to automatically insert a backslash when Shift+Enter is pressed—consider adding this in a future update.
Author
Owner

@rekram1-node commented on GitHub (Oct 3, 2025):

this is a duplicate of: #1505

@rekram1-node commented on GitHub (Oct 3, 2025): this is a duplicate of: #1505
Author
Owner

@rekram1-node commented on GitHub (Oct 3, 2025):

The issue here is opencode isn't able to capture the shift+enter at all it isn't an issue of issuing a backslash vs a newline

Normally this is because you have a conflicting keybind causing shift+enter isn't sending the correct thing

@rekram1-node commented on GitHub (Oct 3, 2025): The issue here is opencode isn't able to capture the shift+enter at all it isn't an issue of issuing a backslash vs a newline Normally this is because you have a conflicting keybind causing shift+enter isn't sending the correct thing
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1945