pub enum Event {
Key(KeyEvent),
Mouse(MouseEvent),
Resize(u32, u32),
Paste(String),
}Expand description
A terminal input event.
Produced each frame by the run loop and passed to your UI closure via
crate::Context. Use the helper methods on Context (e.g., key(),
key_code()) rather than matching on this type directly.
Variants§
Key(KeyEvent)
A keyboard event.
Mouse(MouseEvent)
A mouse event (requires mouse: true in crate::RunConfig).
Resize(u32, u32)
The terminal was resized to the given (columns, rows).
Paste(String)
Pasted text (bracketed paste). May contain newlines.
Trait Implementations§
impl Eq for Event
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