Fix Windows Ctrl+J key event in ConPTY#13120
Open
AndreKalberer wants to merge 1 commit into
Open
Conversation
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.
Contributor
|
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: Comment Powered by Oz |
Contributor
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_Jinstead of letting downstream clients infer Enter from the LF control character.Linked Issue
Closes #11688
ready-to-implement.Testing
Added parser coverage for private Win32 input mode (
CSI ? 9001 h).Added regression coverage that Ctrl+J emits
VK_Jin Win32 input mode.cargo fmtcargo test -p warp_terminalcargo check -p warp --testscargo clippy -p warp_terminal --tests -- -D warningsI have manually tested my changes locally with
./script/runScreenshots / Videos
Not applicable; no UI changes.
Agent Mode
CHANGELOG-BUG-FIX: Fixed Ctrl+J in Codex CLI on Windows being reported as Ctrl+Enter.