pub struct KeyData {
pub key: Key,
pub modified_key: Option<Key>,
pub physical_key: Option<Key>,
pub modifiers: KeyModifiers,
pub text: Option<String>,
pub repeat: bool,
}Expand description
Data from a widget-level key press or release event.
Fields§
§key: KeyThe logical key (typed enum with aliases).
modified_key: Option<Key>Key after modifier application (e.g., Shift+a produces ‘A’).
physical_key: Option<Key>Physical key code (layout-independent).
modifiers: KeyModifiersActive modifier keys.
text: Option<String>Text generated by the key press, if any.
repeat: boolWhether this is an auto-repeat event.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyData
impl RefUnwindSafe for KeyData
impl Send for KeyData
impl Sync for KeyData
impl Unpin for KeyData
impl UnsafeUnpin for KeyData
impl UnwindSafe for KeyData
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