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.
This commit is contained in:
parent
8dab8a0a03
commit
27211abf06
1 changed files with 5 additions and 0 deletions
|
@ -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…
Reference in a new issue