Handle meta keys.
@@ -157,9 +157,20 @@ impl SimpleState for RltkGemBridge {
if self.key_delay > 50.0 {
self.key_delay = 0.0;
for key in inputs.keys_that_are_down() {
+ use crate::VirtualKeyCode;
+ match key {
+ VirtualKeyCode::LShift => self.rltk.shift = true,
+ VirtualKeyCode::RShift => self.rltk.shift = true,
+ VirtualKeyCode::LAlt => self.rltk.alt = true,
+ VirtualKeyCode::RAlt => self.rltk.alt = true,
+ VirtualKeyCode::LControl => self.rltk.control = true,
+ VirtualKeyCode::RControl => self.rltk.control = true,
+ _ => {
self.rltk.key = Some(key);
}
}
+ }
+ }
if let Some(pos) = inputs.mouse_position() {
self.rltk.mouse_pos = (pos.0 as i32, pos.1 as i32);
}
