You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Ctrl+Enter leaks literal [13;5u in 1.4.167 Windows ConPTY terminal #12329
Ctrl+Enter does not perform that check and always emits CSI-u:
data: "\x1B[13;5u"
On local native Windows ConPTY, Orca does not have an active Kitty keyboard protocol for this pane, and Codex receives/prints the raw sequence instead of decoding it as Ctrl+Enter.
After repacking app.asar, restarting Orca, and testing the real xterm Terminal input, Ctrl+Enter produced a normal CR and no new [13;5u leakage. This confirms that the unconditional Ctrl+Enter CSI-u emission is the remaining defect.
Expected
Ctrl+Enter must not emit CSI-u unless the active terminal application has negotiated/enabled the corresponding keyboard protocol. In a native Windows ConPTY pane without KKP, it should use a safe fallback and never inject raw [13;5u into user text.
Related: #8385. My earlier follow-up there incorrectly tested the native chat composer rather than the integrated terminal; I will correct that comment and link this issue.
while Ctrl+Enter three lines below did not, and its comment even acknowledged the gap ("no Windows fallback yet (#2418)").
The PR takes your fallback: gate the sequence on active kitty keyboard, otherwise send the bare CR that xterm.js would have collapsed Ctrl+Enter to. That restores the pre-interception default rather than inventing an encoding. Regression test confirmed to fail against the previous implementation.
Two notes:
I used isKittyKeyboardActivePane alone rather than also borrowing Shift+Enter's getWindowsShiftEnterEncoding signal, since that setting is specifically about the Shift+Enter encoding and reusing it to authorize a different chord would couple two unrelated decisions.
I could not reproduce first-hand, since I do not have Codex on a Korean IME Windows setup, so this is verified by tests rather than observation. If you are able to confirm on 1.4.167 with the branch, that would be worth having before merge.
Activity
ShreyanshVaibhaw commentedon Aug 3, 2026
Opened #12331 for this. Your diagnosis was correct and matched the source exactly.
For the record in
src/renderer/src/components/terminal-pane/terminal-shortcut-policy.ts, the Shift+Enter branch guards its CSI-u emission:while Ctrl+Enter three lines below did not, and its comment even acknowledged the gap ("no Windows fallback yet (#2418)").
The PR takes your fallback: gate the sequence on active kitty keyboard, otherwise send the bare CR that xterm.js would have collapsed Ctrl+Enter to. That restores the pre-interception default rather than inventing an encoding. Regression test confirmed to fail against the previous implementation.
Two notes:
isKittyKeyboardActivePanealone rather than also borrowing Shift+Enter'sgetWindowsShiftEnterEncodingsignal, since that setting is specifically about the Shift+Enter encoding and reusing it to authorize a different chord would couple two unrelated decisions.[13;5uleak. The repeated-newlines-on-Korean-input symptom you also mention is a different path (the IME composition handler) and is covered separately in fix(terminal): stop Shift+jamo from injecting a newline while an IME composes #12187.I could not reproduce first-hand, since I do not have Codex on a Korean IME Windows setup, so this is verified by tests rather than observation. If you are able to confirm on 1.4.167 with the branch, that would be worth having before merge.
fix(terminal): gate Ctrl+Enter CSI-u on a negotiated kitty pane
fix(terminal): protect local ConPTY Ctrl+Enter without breaking TUIs (#…
fix(terminal): gate Ctrl+Enter CSI-u on a negotiated pane, porting #1…
fix(terminal): protect local ConPTY Ctrl+Enter without breaking TUIs (s…