Skip to content

Fix Windows Ctrl+J key event in ConPTY#13120

Open
AndreKalberer wants to merge 1 commit into
warpdotdev:masterfrom
AndreKalberer:andrekalberer/fix-windows-ctrl-j-key-event
Open

Fix Windows Ctrl+J key event in ConPTY#13120
AndreKalberer wants to merge 1 commit into
warpdotdev:masterfrom
AndreKalberer:andrekalberer/fix-windows-ctrl-j-key-event

Conversation

@AndreKalberer

Copy link
Copy Markdown
Contributor

Description

Fixes ConPTY input encoding for Ctrl-letter chords when an application enables Windows Terminal's private Win32 input mode (CSI ? 9001 h). Warp now tracks that mode and emits Win32 input record sequences for Ctrl+A-Z, preserving the original virtual key.

This keeps Ctrl+J as VK_J instead of letting downstream clients infer Enter from the LF control character.

Linked Issue

Closes #11688

  • The linked issue is labeled ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (not applicable; this is terminal input encoding behavior with regression tests).

Testing

  • Added parser coverage for private Win32 input mode (CSI ? 9001 h).

  • Added regression coverage that Ctrl+J emits VK_J in Win32 input mode.

  • cargo fmt

  • cargo test -p warp_terminal

  • cargo check -p warp --tests

  • cargo clippy -p warp_terminal --tests -- -D warnings

  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

Not applicable; no UI changes.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-BUG-FIX: Fixed Ctrl+J in Codex CLI on Windows being reported as Ctrl+Enter.

Encode Ctrl-letter chords as Win32 input records when ConPTY enables private Win32 input mode so Ctrl+J preserves VK_J instead of being inferred as Enter from LF.
@cla-bot cla-bot Bot added the cla-signed label Jun 27, 2026
@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label Jun 27, 2026
@AndreKalberer AndreKalberer marked this pull request as ready for review June 27, 2026 01:31
@oz-for-oss

oz-for-oss Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

@AndreKalberer

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @acarl005.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds support for Windows Terminal's private Win32 input mode in the terminal parser/model and emits Win32 input record sequences for Ctrl+A-Z chords so Ctrl+J preserves VK_J instead of being inferred as Enter.

Concerns

  • No blocking correctness, security, or spec-alignment concerns found in the attached diff.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot requested a review from acarl005 June 27, 2026 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: Ctrl+J is reported as Ctrl+Enter in Codex CLI because Warp emits VK_RETURN for KEY_EVENT_RECORD

1 participant