Add ModifiersChanged to keyboard::Event
This commit is contained in:
parent
1bc69e7a8a
commit
78cb805fac
2 changed files with 6 additions and 0 deletions
|
|
@ -28,4 +28,7 @@ pub enum Event {
|
|||
|
||||
/// A unicode character was received.
|
||||
CharacterReceived(char),
|
||||
|
||||
/// The keyboard modifiers have changed.
|
||||
ModifiersChanged(ModifiersState),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,6 +92,9 @@ pub fn window_event(
|
|||
}
|
||||
}
|
||||
})),
|
||||
WindowEvent::ModifiersChanged(new_modifiers) => Some(Event::Keyboard(
|
||||
keyboard::Event::ModifiersChanged(modifiers_state(*new_modifiers)),
|
||||
)),
|
||||
WindowEvent::HoveredFile(path) => {
|
||||
Some(Event::Window(window::Event::FileHovered(path.clone())))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue