Skip to content

fix(install): filter KeyEventKind on Windows for arrow key navigation#1362

Merged
fengmk2 merged 2 commits intomainfrom
fix-win-vp-i
Apr 13, 2026
Merged

fix(install): filter KeyEventKind on Windows for arrow key navigation#1362
fengmk2 merged 2 commits intomainfrom
fix-win-vp-i

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Apr 12, 2026

On Windows, crossterm emits both Press and Release events for each
key press. Without filtering for Press-only, arrow keys in the
vp i package manager prompt were processed twice per press (move
then move back), making them appear non-functional.

Closes #1361


Note

Low Risk
Low risk: small, localized change to interactive terminal input handling, primarily affecting Windows key navigation behavior.

Overview
Fixes the interactive package manager selection menu to ignore non-press keyboard events by filtering crossterm KeyEventKind to Press before handling navigation/selection keys.

This prevents double-handling of arrow keys on Windows (where both Press and Release events are emitted), making ↑/↓ navigation behave correctly.

Reviewed by Cursor Bugbot for commit a94deea. Configure here.

@fengmk2 fengmk2 self-assigned this Apr 12, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 12, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit de5d2fc
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69dc5c8b49ab880008e1991d

Copy link
Copy Markdown
Member Author

fengmk2 commented Apr 12, 2026


How to use the Graphite Merge Queue

Add the label auto-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

On Windows, crossterm emits both Press and Release events for each
key press. Without filtering for Press-only, arrow keys in the
`vp i` package manager prompt were processed twice per press (move
then move back), making them appear non-functional.

Closes #1361
Copy link
Copy Markdown
Member Author

fengmk2 commented Apr 12, 2026

@cursor review

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit a94deea. Configure here.

Copy link
Copy Markdown
Member Author

fengmk2 commented Apr 12, 2026

windows test pass image.png

Copy link
Copy Markdown
Member

@cpojer cpojer left a comment

Choose a reason for hiding this comment

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

This looks sketchy but I trust your codex.

@graphite-app
Copy link
Copy Markdown

graphite-app bot commented Apr 13, 2026

Merge activity

@fengmk2 fengmk2 merged commit 96a43f3 into main Apr 13, 2026
37 checks passed
@fengmk2 fengmk2 deleted the fix-win-vp-i branch April 13, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: arrow keys don't work in vp i package manager selection prompt

2 participants