Skip to content

Enter/Backspace act twice in kitty (not in tmux; TUI2 unaffected) #8324

@kvcop

Description

@kvcop

What version of Codex is running?

codex-cli 0.75.0

What subscription do you have?

Pro

Which model were you using?

No response

What platform is your computer?

Linux 6.14.0-37-generic x86_64 x86_64

What issue are you seeing?

  • Backspace deletes two characters.
  • Enter behaves like it was pressed twice (e.g., edit mode toggles and immediately submits).

What steps can reproduce the bug?

  1. Run codex CLI in legacy TUI (not TUI2).
  2. In kitty, press Backspace in the composer.
  3. Also reproducible with Enter: press Esc twice to edit the previous message, then press Enter to confirm - it submits immediately as if Enter was handled twice.

What is the expected behavior?

  • Backspace removes a single character.
  • Enter confirms edit or submits once.

Additional information

Summary

In the legacy TUI, some key presses (Backspace and Enter) appear to be processed twice when running inside kitty. This is not reproducible in tmux, and on the same machine TUI2 does not show the issue.

Environment

  • Terminal: kitty
  • Works correctly in tmux on the same machine.
  • TUI2 does not exhibit the issue.

Diagnostics

kitty kitten show-key shows normal codes (no obvious duplication):

Press any keys - Ctrl+D will terminate this program
UNIX    send_text
^M      \r
^?      \x7f

Notes / Hypothesis (not confirmed)

It may be related to enhanced keyboard reporting producing duplicate key events (legacy + enhanced) in kitty. Not confirmed - need assistance to identify root cause of this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displaybugSomething isn't working

    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