#[repr(C)]pub struct KeyEvent {
pub text: SharedString,
pub modifiers: KeyboardModifiers,
pub repeat: bool,
}Expand description
This structure is generated and passed to the key press and release callbacks of the FocusScope element.
Fields§
§text: SharedStringThe unicode representation of the key pressed.
modifiers: KeyboardModifiersThe keyboard modifiers active at the time of the key press event.
repeat: boolThis field is set to true for key press events that are repeated, i.e. the key is held down. It’s always false for key release events.
Trait Implementations§
impl StructuralPartialEq for KeyEvent
Auto Trait Implementations§
impl Freeze 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