pub enum Event {
KeyPressed {
key: Key,
modified_key: Key,
physical_key: Physical,
location: Location,
modifiers: Modifiers,
text: Option<SmolStr>,
},
KeyReleased {
key: Key,
modified_key: Key,
physical_key: Physical,
location: Location,
modifiers: Modifiers,
},
ModifiersChanged(Modifiers),
}
Expand description
A keyboard event.
Note: This type is largely incomplete! If you need to track additional events, feel free to open an issue and share your use case!
Variants§
KeyPressed
A keyboard key was pressed.
Fields
KeyReleased
A keyboard key was released.
Fields
ModifiersChanged(Modifiers)
The keyboard modifiers have changed.
Trait Implementations§
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more