pub enum InputEvent {
Key(KeyEvent),
Paste(String),
Eof,
Resize(u16, u16),
MouseScroll(i32),
MouseDown {
col: u16,
row: u16,
},
MouseDrag {
col: u16,
row: u16,
},
MouseUp,
}Expand description
Events the input thread sends to the main async loop.
Variants§
Key(KeyEvent)
A key was pressed (raw mode).
Paste(String)
A bracketed-paste payload arrived.
Eof
Stdin closed (reader thread exiting).
Resize(u16, u16)
Terminal window resized; carries the new (cols, rows).
The event loop forwards this to the renderer so the DECSTBM
scroll region can re-flow to the new height (footer stays
pinned at [H - footer_rows + 1, H]).
MouseScroll(i32)
Mouse scroll wheel. delta lines: negative = up (older
content), positive = down (newer). Only emitted when the
active renderer has enabled mouse capture (currently
AltScreenRenderer only — RetainedRenderer relies on host-
terminal scrollback, PlainRenderer doesn’t pin a UI).
MouseDown
Mouse primary button pressed at terminal cell (col, row).
MouseDrag
Mouse drag moved to terminal cell (col, row).
MouseUp
Mouse primary button released.
Trait Implementations§
Source§impl Clone for InputEvent
impl Clone for InputEvent
Source§fn clone(&self) -> InputEvent
fn clone(&self) -> InputEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for InputEvent
impl RefUnwindSafe for InputEvent
impl Send for InputEvent
impl Sync for InputEvent
impl Unpin for InputEvent
impl UnsafeUnpin for InputEvent
impl UnwindSafe for InputEvent
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more