Skip to content

Adapt keyboard event reporting to the terminal - #35021

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/03a6b9d5443f626da5279413a14933af2a0ec3e5
Jul 23, 2026
Merged

Adapt keyboard event reporting to the terminal#35021
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/03a6b9d5443f626da5279413a14933af2a0ec3e5

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 23, 2026

Copy link
Copy Markdown

Adapt keyboard event reporting to the terminal

Why

Reporting key event types can leak an exit-shortcut release into the parent
shell in iTerm2 and can cause tmux's xterm extended-key format to lose
Shift+Enter.

What changed

  • Select keyboard enhancement flags using the detected terminal and tmux
    extended-key format.
  • Disable event-type reporting for iTerm2 and tmux's xterm format while
    retaining alternate-key reporting.
  • Preserve event-type reporting for other terminals and tmux's csi-u
    format so repeat events remain distinguishable.

Testing

Added unit coverage for iTerm2, Kitty, unknown terminals, and both tmux
extended-key formats.

## Why

Reporting key event types can leak an exit-shortcut release into the parent
shell in iTerm2 and can cause tmux's `xterm` extended-key format to lose
Shift+Enter.

## What changed

- Select keyboard enhancement flags using the detected terminal and tmux
  extended-key format.
- Disable event-type reporting for iTerm2 and tmux's `xterm` format while
  retaining alternate-key reporting.
- Preserve event-type reporting for other terminals and tmux's `csi-u`
  format so repeat events remain distinguishable.

## Testing

Added unit coverage for iTerm2, Kitty, unknown terminals, and both tmux
extended-key formats.

GitOrigin-RevId: 03a6b9d5443f626da5279413a14933af2a0ec3e5
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/03a6b9d5443f626da5279413a14933af2a0ec3e5 branch from 417dd85 to fe0d472 Compare July 23, 2026 22:35
@copyberry
copyberry Bot merged commit fe0d472 into main Jul 23, 2026
30 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/03a6b9d5443f626da5279413a14933af2a0ec3e5 branch July 23, 2026 22:36
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants