Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui): avoid dupe key events on windows (#7809)
### Description Fixes #7808 Windows console produces an event for a key press as well as an event for when the key is released. This caused a single arrow key press to trigger 2 events. This fix is to ignore release events. As per `crossterm` [docs](https://docs.rs/crossterm/latest/crossterm/event/struct.KeyEvent.html#structfield.kind) > kind: [KeyEventKind](https://docs.rs/crossterm/latest/crossterm/event/enum.KeyEventKind.html) Kind of event. Only set if: Unix: [KeyboardEnhancementFlags::REPORT_EVENT_TYPES](https://docs.rs/crossterm/latest/crossterm/event/struct.KeyboardEnhancementFlags.html#associatedconstant.REPORT_EVENT_TYPES) has been enabled with [PushKeyboardEnhancementFlags](https://docs.rs/crossterm/latest/crossterm/event/struct.PushKeyboardEnhancementFlags.html). Windows: always ### Testing Instructions Use Turbo UI on a run with at least 3 tasks and verify that arrow keys now only move a single task. Closes TURBO-2683 Co-authored-by: Chris Olszewski <Chris Olszewski>
- Loading branch information