pub struct EventBuilder { /* private fields */ }Expand description
Implementations§
Source§impl EventBuilder
impl EventBuilder
Sourcepub fn key_code(self, code: KeyCode) -> Self
pub fn key_code(self, code: KeyCode) -> Self
Append a special key-press event (arrows, Enter, Esc, etc.).
Sourcepub fn key_with(self, code: KeyCode, modifiers: KeyModifiers) -> Self
pub fn key_with(self, code: KeyCode, modifiers: KeyModifiers) -> Self
Append a key-press event with modifier keys (Ctrl, Shift, Alt).
Sourcepub fn click(self, x: u32, y: u32) -> Self
pub fn click(self, x: u32, y: u32) -> Self
Append a left mouse click at terminal position (x, y).
Sourcepub fn mouse_up(self, x: u32, y: u32) -> Self
pub fn mouse_up(self, x: u32, y: u32) -> Self
Append a left mouse button release at terminal position (x, y).
Sourcepub fn drag(self, x: u32, y: u32) -> Self
pub fn drag(self, x: u32, y: u32) -> Self
Append a mouse drag (movement with the left button held) at (x, y).
Sourcepub fn key_release(self, c: char) -> Self
pub fn key_release(self, c: char) -> Self
Append a key-release event for character c.
Only meaningful on terminals that emit release events (e.g. with the Kitty keyboard protocol enabled).
Sourcepub fn focus_gained(self) -> Self
pub fn focus_gained(self) -> Self
Append a terminal focus-gained event.
Sourcepub fn focus_lost(self) -> Self
pub fn focus_lost(self) -> Self
Append a terminal focus-lost event.
Sourcepub fn scroll_down(self, x: u32, y: u32) -> Self
pub fn scroll_down(self, x: u32, y: u32) -> Self
Append a scroll-down event at (x, y).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventBuilder
impl RefUnwindSafe for EventBuilder
impl Send for EventBuilder
impl Sync for EventBuilder
impl Unpin for EventBuilder
impl UnsafeUnpin for EventBuilder
impl UnwindSafe for EventBuilder
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