Skip to content

TUI: allow configurable newline/send keybindings (Shift+Enter alternative to Ctrl+J) #1626

@ThePlenkov

Description

@ThePlenkov

Problem

In cagent run (TUI), newline currently falls back to Ctrl+J when keyboard enhancements are unavailable. In practice this can be problematic in terminal workflows (especially inside VS Code), where Ctrl+J is often already bound.

Request

Please support customizable input keybindings in TUI, specifically for send and insert newline actions.

At minimum, please provide an option to choose an alternative newline shortcut besides Ctrl+J when Shift+Enter is not detected/supported.

Why this matters

  • Ctrl+J conflicts with common editor/terminal shortcuts
  • Some terminal/tmux combinations don’t reliably deliver Shift+Enter
  • Users need a practical fallback they can control

Suggested approaches

  • Config option(s), e.g. in user config, for:
    • editor.send_key
    • editor.newline_key
  • Optional env var override for quick testing
  • Runtime command/help to display active bindings

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/tuiFor features/issues/fixes related to the TUIeffort:smallIsolated change, clear solution, single areapriority:mediumNormal priority, standard sprint work
    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions