[egui_glium] Fix a bug where key releases weren't sent to Egui

Fixes https://github.com/emilk/egui/issues/102
This commit is contained in:
Emil Ernerfeldt 2021-01-11 18:05:50 +01:00
parent b08870dcee
commit 4933bb3c30
2 changed files with 12 additions and 6 deletions

View file

@ -7,6 +7,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## Unreleased ## Unreleased
### Fixed 🐛
* Fix a bug where key releases weren't sent to Egui
## 0.7.0 - 2021-01-04 ## 0.7.0 - 2021-01-04

View file

@ -123,7 +123,10 @@ pub fn input_to_egui(
} }
} }
} }
} else if let Some(key) = translate_virtual_key_code(keycode) { }
}
if let Some(key) = translate_virtual_key_code(keycode) {
input_state.raw.events.push(Event::Key { input_state.raw.events.push(Event::Key {
key, key,
pressed, pressed,
@ -132,7 +135,6 @@ pub fn input_to_egui(
} }
} }
} }
}
MouseWheel { delta, .. } => { MouseWheel { delta, .. } => {
match delta { match delta {
glutin::event::MouseScrollDelta::LineDelta(x, y) => { glutin::event::MouseScrollDelta::LineDelta(x, y) => {