#[repr(C)]pub struct KeyEvent {
pub code: KeyCode,
pub modifiers: KeyModifiers,
pub kind: KeyEventKind,
pub state: KeyEventState,
}Expand description
Represents a key event.
Fields§
§code: KeyCodeThe key itself.
modifiers: KeyModifiersAdditional key modifiers.
kind: KeyEventKindKind of event.
Only set if:
- Unix: [
KeyboardEnhancementFlags::REPORT_EVENT_TYPES] has been enabled withcrossterm_event_push_keyboard_enhancement_flags. - Windows: always
state: KeyEventStateKeyboard state.
Only set if [KeyboardEnhancementFlags::DISAMBIGUATE_ESCAPE_CODES] has been enabled with
[PushKeyboardEnhancementFlags].
Auto Trait Implementations§
impl Freeze for KeyEvent
impl RefUnwindSafe for KeyEvent
impl Send for KeyEvent
impl Sync for KeyEvent
impl Unpin 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