GeezerVison is showing github.com — [FEATURE]: Support modifying newline and submit keybinds in TUI/GUI · Issue #11898 · anomalyco/opencode
[FEATURE]: Support modifying newline and submit keybinds in TUI/GUI #11898DescriptionQuestion
Is there any way to use enter to send newline(\n), and ctrl+enter to send message.
Relate Issue
Reacted by Jorge, Philip Mateescu, Inari0, TatsuyaKITABORI, Esa-Matti Suuronen, hiraghi, S. Mahdi Mir-Ismaili and Igor WebDev Activitygithub-actions commented on Feb 3, 2026 This issue might be a duplicate of existing issues. Please check:
For keybind-related issues, please also check our pinned keybinds documentation: #4997 jorgedanisc commented on Feb 14, 2026
This would be really interesting to me as well on the Desktop App! Claude Code handles this nicely (uploaded a screenshot from their Settings on VSCode)
It could be as simple as adding that checkbox I uploaded above - or just two new shortcuts on the settings (line break and input submit) Reacted by Alex Yaroshuk, Sang and Philip Mateescu philipmat commented on Feb 23, 2026 The Codex desktop app does it the same way and it's particularly nice when writing multi-line prompts (which for me is most of the time).
 TomServo138 commented on Mar 18, 2026 Surprising bug to let thru, for such an otherwise prominent program. Obviously should have been fixed immedately ... last month.
That said, came here to let others know that one workaround, in the meantime, is use Ghosttly and add this to config:
# Swap Enter and Ctrl+Enter for OpenCode
keybind = enter=text:\n
keybind = ctrl+enter=text:\r
Molunerfinn commented on Mar 22, 2026 Reacted by hiraghi, Airic Lenz and Sam serhumanos commented on Oct 4, 2026 This will be very useful; in most cases, I hit Enter to add a new line. IgorWRD commented on Oct 20, 2026 +1 - confirming this is still an issue in the desktop app on Windows (v2.1.0).
Desired behavior: Enter inserts a newline, Ctrl+Enter submits the message.
Current behavior: Enter always submits, and the documented input.submit / input.newline overrides in cli.json are ignored by the desktop composer.
An app-level option (like the "Enter sends message" checkbox in other AI chat clients) would solve this for desktop and web clients - multi-line prompts are quite common, and the current behavior causes accidental sends.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|