[−][src]Enum termimad::Event
a valid user event
Variants
Key(KeyEvent)
Click(u16, u16, KeyModifiers)
RightClick(u16, u16, KeyModifiers)
terminal was resized. Contains the new dimensions
Wheel(i32)
mouse wheel turns. contains -1 if up or 1 if down
Methods
impl Event
[src]
pub fn from_crossterm_event(crossterm_event: Result<Event>) -> Option<Event>
[src]
convert a crossterm event into a termimad one.
normalize \r and \n into Enter (useful for key combinations)
To get a double-click you'll either need to use a termimad event-source or to do the computation yourself.
pub const fn crtl_key(code: KeyCode) -> Self
[src]
pub const fn simple_key(code: KeyCode) -> Self
[src]
pub fn mouse_pos(self) -> Option<(u16, u16)>
[src]
In case the event is mouse related, give the position
Trait Implementations
impl Clone for Event
[src]
impl Copy for Event
[src]
impl Debug for Event
[src]
impl Eq for Event
[src]
impl PartialEq<Event> for Event
[src]
impl StructuralEq for Event
[src]
impl StructuralPartialEq for Event
[src]
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>,