Skip to content

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

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

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

Conversation

@fengmk2

@fengmk2 fengmk2 commented Apr 12, 2026

Copy link
Copy Markdown
Member

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

netlify Bot commented Apr 12, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

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

fengmk2 commented Apr 12, 2026

Copy link
Copy Markdown
Member Author

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

fengmk2 commented Apr 12, 2026

Copy link
Copy Markdown
Member Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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.

fengmk2 commented Apr 12, 2026

Copy link
Copy Markdown
Member Author

windows test pass image.png

@fengmk2
fengmk2 marked this pull request as ready for review April 13, 2026 00:54
@fengmk2
fengmk2 requested review from cpojer and wan9chi April 13, 2026 00:55

@cpojer cpojer left a comment

Copy link
Copy Markdown
Member

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

graphite-app Bot commented Apr 13, 2026

Copy link
Copy Markdown

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