pub enum Event {
Key(KeyEvent),
Mouse(MouseEvent),
Resize {
width: u16,
height: u16,
},
Paste(PasteEvent),
Focus(bool),
Clipboard(ClipboardEvent),
Tick,
}Expand description
Canonical input event.
This enum represents all possible input events that ftui can receive from the terminal.
Variants§
Key(KeyEvent)
A keyboard event.
Mouse(MouseEvent)
A mouse event.
Resize
Terminal was resized.
Paste(PasteEvent)
Paste event (from bracketed paste mode).
Focus(bool)
Focus gained or lost.
true = focus gained, false = focus lost.
Clipboard(ClipboardEvent)
Clipboard content received (optional, from OSC 52 response).
Tick
A tick event from the runtime.
Fired when a scheduled tick interval elapses. Applications use this
for periodic updates (animations, polling, timers). The model’s update
method receives the tick and can respond with state changes.
Implementations§
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