Skip to content

Ctrl+M not treated as Enter in interactive TUI applications #11563

@Okiichi1122

Description

@Okiichi1122

Bug Description

Ctrl+M (which should send the same key code as Enter, ASCII 13 / carriage return) does not behave the same as the Enter key when used in interactive TUI applications (specifically Claude Code CLI).

Input submitted via Ctrl+M is sent but the user's input text is not displayed in the application's chat history. The same input submitted via the Enter key displays correctly.

Steps to Reproduce

  1. Launch Ghostty
  2. Run an interactive TUI application (e.g., Claude Code: claude)
  3. Type any text in the input field
  4. Press Ctrl+M to submit
  5. Observe that the user's input text is not displayed

Expected Behavior

Ctrl+M should behave identically to the Enter key, as both should send carriage return (0x0D).

Actual Behavior

  • Enter → input text displayed correctly
  • Ctrl+M → input text sent but not displayed

Comparison with other terminals

  • Terminal.app (macOS): Ctrl+M works correctly, same as Enter
  • Ghostty (no Zellij): Ctrl+M fails for any length of input
  • Ghostty + Zellij: Ctrl+M fails for single character input, works for 2+ characters (Zellij partially compensates)

Environment

  • Ghostty version: latest
  • OS: macOS 26.3.1 (Apple M2)
  • Ghostty config:
    macos-option-as-alt = left
    
  • Application tested: Claude Code CLI v2.1.74

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions