Repository navigation
fix(terminal): clear stale Windows IME modifiers - #12259
Merged
Merged
Conversation
Contributor
📝 WalkthroughWalkthroughThe change adds Windows IME modifier reconciliation to keyboard event handling. The handler updates tracked Shift and Ctrl state during modifier keydown, redispatched Enter keydown, and non-IME-Enter keyup events. A test verifies that a composing Process keyup clears held Shift state so a later Enter keydown is not prevented. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
4 of 7 tasks
nwparker
pushed a commit
that referenced
this pull request
Aug 3, 2026
Co-authored-by: OrcaWin <[email protected]>
nwparker
pushed a commit
that referenced
this pull request
Aug 3, 2026
Co-authored-by: OrcaWin <[email protected]>
This was referenced Aug 3, 2026
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
Co-authored-by: OrcaWin <[email protected]>
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.
Summary
KeyboardEvent.getModifierState()on keyboard events.Processkeyups while preserving the modifier-lost Enter redispatch used by active composition chords.Fixes #12256
Screenshots
No visual change.
Testing
pnpm lintpnpm typecheck:webpnpm testpnpm buildpnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/terminal-ime-deferred-newline.test.ts src/renderer/src/components/terminal-pane/keyboard-handlers-ime.test.tsx(38 tests)check:code-quality:changedencountered a Windows Node 24spawnSync pnpm.cmd EINVAL; each of its three Oxlint scans was run directly and passed.AI Review Report
Reviewed modifier lifecycle, Chromium's modifier-lost composition Enter redispatch, editable-target scoping, and the existing Shift/Ctrl rollover behavior. The initial unconditional synchronization approach would have broken legitimate composition redispatches, so reconciliation preserves only an Enter owned by the active chord and clears it immediately after absorption.
Cross-platform review confirmed the new behavior remains gated by the existing Windows-only modifier state: macOS/Linux shortcut handling, labels, paths, shells, SSH/folder workspaces, and Electron host behavior are unchanged.
Security Audit
No new input sources, command execution, path handling, authentication, secrets, dependencies, or IPC are introduced. The change only reconciles renderer-local keyboard state from browser-provided modifier flags.
Notes
Regression introduced by #11293 (
fe6f929c6e), which addedheldImeEnterModifiersand released entries by matchingevent.key; Windows IMEProcesskeyups bypass that match.The reported composition-overlay offset is visually separate and remains out of scope because no shared root cause was identified.