pub enum Event {
Key(KeyEvent),
Mouse(MouseEvent),
Resize {
width: u16,
height: u16,
},
Paste(PasteEvent),
Ime(ImeEvent),
Focus(bool),
Clipboard(ClipboardEvent),
TerminalResponse(TerminalResponse),
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).
Ime(ImeEvent)
IME composition event (preedit lifecycle).
Focus(bool)
Focus gained or lost.
true = focus gained, false = focus lost.
Clipboard(ClipboardEvent)
Clipboard content received (optional, from OSC 52 response).
TerminalResponse(TerminalResponse)
Terminal query or control-string response (DCS, APC, XTWINOPS cell size).
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§
Source§impl Event
impl Event
Sourcepub const fn event_type_label(&self) -> &'static str
pub const fn event_type_label(&self) -> &'static str
Return a static label for the event type (for metrics/tracing).
Sourcepub const fn name(&self) -> &'static str
pub const fn name(&self) -> &'static str
Return the canonical event type name (alias for Self::event_type_label).