Skip to content

Make Alt+Enter the primary multiline input shortcut #443

Description

@alecuba16

Problem

Shift+Enter is documented as the shortcut for inserting a newline in the input composer, but it does not work in some terminals. Instead of adding a line break, the prompt is submitted as if plain Enter was pressed.

Why it happens

Some terminals do not send a distinct key event for Shift+Enter. They report it the same way as plain Enter, so the TUI cannot tell whether the user wanted to submit or insert a newline.

What could be better

Keep the current keyboard protocol behavior to avoid risking printable text and non-US keyboard layout regressions from REPORT_ALL_KEYS_AS_ESCAPE_CODES.

Make Alt+Enter the first-class documented newline shortcut because it is more compatible across terminals and is reliably reported by common terminal emulators. Keep Shift+Enter documented only as a supported-terminal shortcut.

The input hint shown while composing during a running turn should mention this directly next to the existing Ctrl/Cmd+Enter queue/send hint.

Example implementation

Compare link:
master...alecuba16:jcode:multiline-input

Metadata

Metadata

Assignees

No one assigned

    Labels

    autonomous: likelyProbably hands-off: clearly worth fixing, agent can do it, minor judgment needed.enhancementNew feature or requestpriority: lowP3 - nice to have / minor / cosmetictriage: needs-decisionNeeds maintainer decision/design thought

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions