pub struct TerminalMouseEvent {
pub event_type: MouseEventType,
pub col: u16,
pub row: u16,
/* private fields */
}Expand description
Mouse event data with terminal cell coordinates.
Represents a mouse event translated from pixel coordinates to terminal
grid coordinates, including modifier key states.col and row are 0-based
terminal grid coordinates
Fields§
§event_type: MouseEventTypeType of mouse event (down, up, or move).
col: u16Column in the terminal grid (0-based).
row: u16Row in the terminal grid (0-based).
Implementations§
Source§impl TerminalMouseEvent
impl TerminalMouseEvent
Returns the mouse button pressed during the event.
Sourcepub fn meta_key(&self) -> bool
pub fn meta_key(&self) -> bool
Returns whether the Meta key was pressed during the event.
This is the Command key on macOS or the Windows key on Windows.
Sourcepub fn has_exact_modifiers(&self, mods: ModifierKeys) -> bool
pub fn has_exact_modifiers(&self, mods: ModifierKeys) -> bool
Returns whether the pressed modifiers exactly match the specified set.
Returns true only if the modifier keys pressed during the event
are exactly equal to mods—no more, no less.
Trait Implementations§
Source§impl Clone for TerminalMouseEvent
impl Clone for TerminalMouseEvent
Source§fn clone(&self) -> TerminalMouseEvent
fn clone(&self) -> TerminalMouseEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TerminalMouseEvent
impl Debug for TerminalMouseEvent
Source§impl From<TerminalMouseEvent> for MouseEvent
impl From<TerminalMouseEvent> for MouseEvent
Source§fn from(event: TerminalMouseEvent) -> Self
fn from(event: TerminalMouseEvent) -> Self
Converts to this type from the input type.
impl Copy for TerminalMouseEvent
Auto Trait Implementations§
impl Freeze for TerminalMouseEvent
impl RefUnwindSafe for TerminalMouseEvent
impl Send for TerminalMouseEvent
impl Sync for TerminalMouseEvent
impl Unpin for TerminalMouseEvent
impl UnwindSafe for TerminalMouseEvent
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