#[non_exhaustive]#[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 (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.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