pub enum Event {
Close,
Resize {
width: i32,
height: i32,
},
MouseMove {
x: i32,
y: i32,
},
MouseScroll {
delta: i32,
},
KeyPressed {
key: KeyCode,
ctrl: bool,
shift: bool,
},
KeyReleased {
key: KeyCode,
ctrl: bool,
shift: bool,
},
ShiftPressed,
ShiftReleased,
ControlPressed,
ControlReleased,
AltPressed,
AltReleased,
}Expand description
A single input event.
Variants§
Close
Terminal window closed.
Resize
Terminal window resized. Needs to have window.resizeable = true to occur.
Note, that, as of 40e6253,
the terminal window is cleared when resized.
MouseMove
Mouse moved.
If precise-mouse is off, generated each time mouse moves from cell to cell, otherwise,
when it moves from pixel to pixel.
Fields
MouseScroll
Mouse wheel moved.
Fields
KeyPressed
A keyboard or mouse button pressed (might repeat, if set in OS).
Fields
KeyReleased
A keyboard or mouse button released.
Fields
ShiftPressed
The Shift key pressed (might repeat, if set in OS).
ShiftReleased
The Shift key released.
ControlPressed
The Shift key pressed (might repeat, if set in OS).
ControlReleased
The Control key released.
AltPressed
The Alt key pressed (might repeat, if set in OS).
AltReleased
The Alt key released.
Trait Implementations§
impl Copy for Event
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 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
Mutably borrows from an owned value. Read more