pub enum Event {
Key(Key),
KeyUp(Key),
Mouse(Mouse),
Resize {
columns: u16,
rows: u16,
},
Paste(String),
Tick,
Returned(Option<i32>),
Link(String),
}Expand description
One input event.
Variants§
Key(Key)
A key pressed, or held down long enough to repeat.
KeyUp(Key)
A key let go. Terminals report it with the kitty keyboard protocol
on (see SessionOptions::legacy_keys), and
the Windows console always. Nothing binds it: a component that wants
it matches it itself.
Mouse(Mouse)
Resize
The terminal is now this size.
Paste(String)
Text pasted with bracketed paste on.
Tick
A component’s tick interval passed (see
Component::tick).
Returned(Option<i32>)
A command the component handed the terminal to (with
Flow::Handoff) exited with this code
(None: killed by a signal).
Link(String)
The left button went down on a hyperlink (an OSC 8 region: a
Style with a link) in the component’s view (#476).
Delivered instead of the Event::Mouse; what to do with the URL
(open it, print it, ignore it) is the component’s or its caller’s
choice, never the event loop’s.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.