Ignore key-release keyboard events (#6139)

Since crossterm 0.26.x, we receive press/release keyboard events on
Windows always. We can ignore the release events though to emulate
the behavior of keyboard input on Windows on crossterm 0.25.x.
pull/5/head
Michael Davis 2 years ago committed by GitHub
parent 8dab8a0a03
commit 27211abf06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -638,6 +638,11 @@ impl Application {
self.compositor
.handle_event(&Event::Resize(width, height), &mut cx)
}
// Ignore keyboard release events.
CrosstermEvent::Key(crossterm::event::KeyEvent {
kind: crossterm::event::KeyEventKind::Release,
..
}) => false,
event => self.compositor.handle_event(&event.into(), &mut cx),
};

Loading…
Cancel
Save