pub struct KeyEvent {
pub key: Key,
pub mods: Modifiers,
pub action: KeyAction,
pub shifted_key: Option<char>,
pub base_key: Option<char>,
pub text: Option<char>,
}Expand description
A key event: a key, the modifiers held with it, its press/repeat/release type
(defaults to Press), and consumer-supplied extras the kitty protocol’s
alternate-keys / associated-text flags report (all None for legacy).
Fields§
§key: Key§mods: Modifiers§action: KeyAction§shifted_key: Option<char>Kitty alternate-keys (bit 2): the codepoint Shift would produce, if it
differs from key.
base_key: Option<char>Kitty alternate-keys (bit 2): the codepoint at this key’s position on the
base (standard) layout, if it differs from key.
text: Option<char>Kitty associated-text (bit 4): the text the key actually produced (composed input / dead keys).
Trait Implementations§
impl Copy for KeyEvent
impl Eq for KeyEvent
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