[−][src]Enum terminal_input::Event
A single event generated by a terminal. Simple text input, whether arriving via a pipe, a paste command, or typing, will be represented with KeyPress events. These events are inherently lossy and have different levels of support on different terminals. Depending on the use case, certain modifier keys may just never be recorded, key repeats will be indistinguishable from orignal presses, pastes may not be bracketed, and key releases may never be registered, among other failures.
Variants
A single typing action by the user, input from stdin. Except between PasteBegin and PasteEnd events, these typically will not be control characters, as those are heuristically decoded into modifier keys combined with printable characters.
Fields of KeyPress
This is kept as a separate event from KeyPress as it usually does not want to be handled in the same way and is supported by very few terminals, making it easy to miss in testing.
A motion or click of a mouse button. Modifiers typically are only be available on button state changes, not mouse motion.
An indication that the following events occur purely as result of the user pasting from some unknown location that should be conservatively considered malicious. Applications should filter out control commands that happen during a paste, only considering the input as raw, unescaped text.
The marker indicating a return to normal user interaction.
The window has been resized and the application may want to rerender to fit the new sizee.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,