pub enum Key {
Pressed {
scan_code: u32,
virtual_key: Option<VirtualKey>,
},
Released {
scan_code: u32,
virtual_key: Option<VirtualKey>,
},
ModifierPressed {
modifier: u32,
virtual_key: VirtualKey,
},
}
Expand description
Keyboard events are generated in response to keyboard events coming from the windowing system.
Variants§
Pressed
Emitted when a key is pressed.
Released
Emitted when a key is released.
ModifierPressed
Emitted when a modifier key is pressed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnwindSafe for Key
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