pub enum Event {
Key(KeyEvent),
Mouse(MouseEvent),
Resize(u16, u16),
Paste(String),
FocusGained,
FocusLost,
}Expand description
Unified input event type used by the framework.
Wraps crossterm events into a simpler enum that components consume via
Component::handle_input.
Variants§
Key(KeyEvent)
A keyboard event.
Mouse(MouseEvent)
A mouse event (click, scroll, drag).
Resize(u16, u16)
Terminal resized to the given dimensions (cols, rows).
Paste(String)
Bracketed paste payload.
FocusGained
Terminal gained focus.
FocusLost
Terminal lost focus.
Trait Implementations§
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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