Skip to content

fix: skip selector keyboard on windows#3286

Merged
amitksingh1490 merged 3 commits into
mainfrom
fix/windows-selector-keyboard-enhancement
May 8, 2026
Merged

fix: skip selector keyboard on windows#3286
amitksingh1490 merged 3 commits into
mainfrom
fix/windows-selector-keyboard-enhancement

Conversation

@amitksingh1490
Copy link
Copy Markdown
Contributor

@amitksingh1490 amitksingh1490 commented May 7, 2026

Summary

Fix the Windows selector startup failure by skipping crossterm keyboard progressive enhancement on Windows while preserving normal selector input handling.

Context

Fixes #3285.

The selector currently pushes KeyboardEnhancementFlags::DISAMBIGUATE_ESCAPE_CODES during terminal setup. On Windows, crossterm can route that command through the legacy Windows API path for stderr, where keyboard progressive enhancement is unsupported and fails before the selector can render.

Changes

  • Gate keyboard progressive enhancement imports and setup to non-Windows platforms.
  • Track whether keyboard enhancement was enabled before attempting to pop it during teardown.
  • Preserve raw mode, mouse capture, cursor hide/show, and the existing selector event loop behavior.

Key Implementation Details

Windows now returns false from the keyboard enhancement setup helper, so teardown skips PopKeyboardEnhancementFlags. Non-Windows platforms continue to use PushKeyboardEnhancementFlags(KeyboardEnhancementFlags::DISAMBIGUATE_ESCAPE_CODES) as before.

Use Cases

  • Windows users can open nucleo-backed list selectors without hitting crossterm's unsupported progressive keyboard enhancement error.
  • Basic selector interactions continue to work: typing to filter, arrow navigation, enter/escape, tab multi-select, page up/down, and mouse wheel scrolling.

Testing

cargo check -p forge_select

Links

Avoid crossterm's unsupported keyboard progressive enhancement path on Windows while preserving the selector's normal input handling.

Co-Authored-By: ForgeCode <noreply@forgecode.dev>
@github-actions github-actions Bot added os: windows Windows-specific issue or feature. type: feature Brand new functionality, features, pages, workflows, endpoints, etc. type: fix Iterations on existing features or infrastructure. labels May 7, 2026
@amitksingh1490 amitksingh1490 enabled auto-merge (squash) May 8, 2026 04:35
@amitksingh1490 amitksingh1490 removed the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label May 8, 2026
@github-actions github-actions Bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label May 8, 2026
@amitksingh1490 amitksingh1490 merged commit a10be11 into main May 8, 2026
9 checks passed
@amitksingh1490 amitksingh1490 deleted the fix/windows-selector-keyboard-enhancement branch May 8, 2026 04:38
@amitksingh1490 amitksingh1490 changed the title fix: skip selector keyboard enhancement on windows fix: skip selector keyboard on windows May 8, 2026
@amitksingh1490 amitksingh1490 removed the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

os: windows Windows-specific issue or feature. type: fix Iterations on existing features or infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ERROR: Keyboard progressive enhancement not implemented for the legacy Windows API.

2 participants