pub enum SemanticEvent {
Click {
pos: Position,
button: MouseButton,
},
DoubleClick {
pos: Position,
button: MouseButton,
},
TripleClick {
pos: Position,
button: MouseButton,
},
LongPress {
pos: Position,
duration: Duration,
},
DragStart {
pos: Position,
button: MouseButton,
},
DragMove {
start: Position,
current: Position,
delta: (i16, i16),
},
DragEnd {
start: Position,
end: Position,
},
DragCancel,
Chord {
sequence: Vec<ChordKey>,
},
Swipe {
direction: SwipeDirection,
distance: u16,
velocity: f32,
},
}Expand description
High-level semantic events derived from raw terminal input.
These represent user intentions rather than raw key presses or mouse coordinates. A gesture recognizer converts raw events into these.
Variants§
Click
Single click (mouse down + up in same position within threshold).
DoubleClick
Two clicks within the double-click time threshold.
TripleClick
Three clicks within threshold (often used for line selection).
LongPress
Mouse held down beyond threshold without moving.
DragStart
Mouse moved beyond drag threshold while button held.
DragMove
Ongoing drag movement.
DragEnd
Mouse released after drag.
DragCancel
Drag cancelled (Escape pressed, focus lost, etc.).
Chord
Key chord sequence completed (e.g., Ctrl+K, Ctrl+C).
Invariant: sequence is always non-empty.
Swipe
Swipe gesture (rapid mouse movement in a cardinal direction).
Implementations§
Trait Implementations§
Source§impl Clone for SemanticEvent
impl Clone for SemanticEvent
Source§fn clone(&self) -> SemanticEvent
fn clone(&self) -> SemanticEvent
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 SemanticEvent
impl Debug for SemanticEvent
Source§impl PartialEq for SemanticEvent
impl PartialEq for SemanticEvent
impl StructuralPartialEq for SemanticEvent
Auto Trait Implementations§
impl Freeze for SemanticEvent
impl RefUnwindSafe for SemanticEvent
impl Send for SemanticEvent
impl Sync for SemanticEvent
impl Unpin for SemanticEvent
impl UnsafeUnpin for SemanticEvent
impl UnwindSafe for SemanticEvent
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