Fix Windows Ctrl+J key event in ConPTY#13120
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.
|
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 |
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
acarl005
left a comment
There was a problem hiding this comment.
@AndreKalberer Thanks for submitting the fix. Please upload a video demonstrating that ctrl+j works as intended and then I'll review.
|
Video demonstrating Ctrl+J in the PR build:
Video file to upload: Screen.Recording.2026-07-01.173407.mp4 |
|
Hi @AndreKalberer — a reviewer requested changes on this PR and it hasn't had activity from you in 7 days. When you get a chance, please push updates or reply to the review so a reviewer can take another look. Without activity, this PR will be automatically closed after 14 days of inactivity. |
|
@acarl005 I uploaded the requested Ctrl+J demo above and added it to the PR description. The video shows the PR build reporting |
|
@AndreKalberer Sorry review is taking so long. I wasn't expecting the fix to entail adding recognition for a whole new input protocol. It's deeper than I expected. I'll have to get to this next week. |
|
It was my mistake to label this as |
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 asVK_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 fmt-cargo 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 Ctrl+J validation video:
Screen.Recording.2026-07-01.173407.mp4
The PR build reports:
wVirtualKeyCode=0x004a(VK_J)uChar=0x000a(LF)PASS: Ctrl+J is reported as VK_J with LF.Agent Mode
CHANGELOG-BUG-FIX: Fixed Ctrl+J in Codex CLI on Windows being reported as Ctrl+Enter.