pub struct KeyEvent {
pub code: KeyCode,
pub modifiers: Modifiers,
}Expand description
A normalized keyboard event passed to editor hooks.
code is the structured key identity (see KeyCode); printable input
arrives as Char, so hooks match KeyCode::Enter / KeyCode::Char('d')
instead of stringly key names.
Fields§
§code: KeyCodeThe structured key identity.
modifiers: ModifiersThe active keyboard modifiers during the key event.
Implementations§
Trait Implementations§
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