pub struct KeyEvent {
pub key: Key,
pub pressed: bool,
pub repeat: bool,
pub modifiers: Modifiers,
pub text: Option<String>,
}Expand description
A keyboard key that was pressed or released.
Fields§
§key: KeyWhich key the event refers to.
pressed: boolWhether the key is being pressed, as opposed to released.
repeat: boolWhether this event repeats a key the user holds down.
modifiers: ModifiersThe keyboard modifiers held when the event happened.
text: Option<String>The text the keypress produces, when it produces any.
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