pub struct KeyEvent {
pub key: Key,
pub text: Option<String>,
pub modifiers: Modifiers,
pub repeat: bool,
}Expand description
A key press, or a repeat of a key held down.
Fields§
§key: KeyWhich key, as the keyboard layout names it.
text: Option<String>The text it types, if any, with Shift and the layout applied:
"A" for Shift+a. Keys like Enter and Ctrl combinations type none.
modifiers: ModifiersThe modifiers held.
repeat: boolWhether this is a repeat of a key held down.
Trait Implementations§
impl Eq for KeyEvent
impl StructuralPartialEq for KeyEvent
Auto Trait Implementations§
impl Forget for KeyEvent
impl Freeze for KeyEvent
impl Move for KeyEvent
impl RefUnwindSafe for KeyEvent
impl Send for KeyEvent
impl Sync for KeyEvent
impl Unpin for KeyEvent
impl UnsafeUnpin for KeyEvent
impl UnwindSafe for KeyEvent
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