Browse Source

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

Fixes https://github.com/emilk/egui/issues/102
pull/107/head
Emil Ernerfeldt 4 years ago
parent
commit
4933bb3c30
  1. 4
      egui_glium/CHANGELOG.md
  2. 14
      egui_glium/src/lib.rs

4
egui_glium/CHANGELOG.md

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

14
egui_glium/src/lib.rs

@ -123,14 +123,16 @@ pub fn input_to_egui(
}
}
}
} else if let Some(key) = translate_virtual_key_code(keycode) {
input_state.raw.events.push(Event::Key {
key,
pressed,
modifiers: input_state.raw.modifiers,
});
}
}
if let Some(key) = translate_virtual_key_code(keycode) {
input_state.raw.events.push(Event::Key {
key,
pressed,
modifiers: input_state.raw.modifiers,
});
}
}
}
MouseWheel { delta, .. } => {

Loading…
Cancel
Save