pub struct Key {
pub text: String,
pub mod_keys: KeyMod,
pub code: char,
pub shifted_code: Option<char>,
pub base_code: Option<char>,
pub is_repeat: bool,
}Expand description
Key represents a Key press or release event in v2.0.8.
Fields§
§text: StringText contains actual characters received.
mod_keys: KeyModModifier keys pressed.
code: charKey code character/rune.
shifted_code: Option<char>Shifted key code.
base_code: Option<char>Base key code on US PC-101 layout.
is_repeat: boolWhether key is auto-repeating.
Implementations§
Trait Implementations§
impl Eq for Key
impl StructuralPartialEq for Key
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnsafeUnpin for Key
impl UnwindSafe for Key
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