Skip to content

Decode Windows Terminal's mapped Shift+Enter sequence - #50720

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/95ab39960510d71322824c63817710633a2fda23
Oct 3, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/95ab39960510d71322824c63817710633a2fda23

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Decode Windows Terminal's mapped Shift+Enter sequence

Why

Windows Terminal's sendInput mapping delivers ESC[13;2u as individual console key events. Decode it as Shift+Enter so the mapping inserts a newline in the composer.

What changed

  • Wrap the Windows event stream with a decoder for the complete Escape-prefixed sequence, including interleaved key releases.
  • Use a fixed 50 ms deadline for partial sequences and replay incomplete or mismatched input unchanged. Preserve literal text, paste events, and native key events.
  • Update the crossterm revision and dependency lockfiles.

Testing

Add tests for repeated and fragmented mappings, deadline handling, unchanged input, error and end-of-stream replay, and composer newline rendering with a snapshot.

## Why

Windows Terminal's `sendInput` mapping delivers `ESC[13;2u` as individual console key events. Decode it as `Shift+Enter` so the mapping inserts a newline in the composer.

## What changed

- Wrap the Windows event stream with a decoder for the complete Escape-prefixed sequence, including interleaved key releases.
- Use a fixed 50 ms deadline for partial sequences and replay incomplete or mismatched input unchanged. Preserve literal text, paste events, and native key events.
- Update the `crossterm` revision and dependency lockfiles.

## Testing

Add tests for repeated and fragmented mappings, deadline handling, unchanged input, error and end-of-stream replay, and composer newline rendering with a snapshot.

GitOrigin-RevId: 95ab39960510d71322824c63817710633a2fda23
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/95ab39960510d71322824c63817710633a2fda23 branch from c509452 to 447eac3 Compare October 3, 2026 21:21
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@copyberry
copyberry Bot merged commit 447eac3 into main Oct 3, 2026
1 of 3 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/95ab39960510d71322824c63817710633a2fda23 branch October 3, 2026 21:21
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 3, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — 447eac3b Deployed Oct 3, 2026 by tshassell-png via Generate label suggestions #51511
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.

6 participants