Expand description
High-level semantic events derived from raw terminal input (bd-3fu8).
SemanticEvent represents user intentions rather than raw key presses or
mouse coordinates. A gesture recognizer (see bd-2v34) converts raw [Event]
sequences into these semantic events.
§Design
§Invariants
- Every drag sequence is well-formed:
DragStart→ zero or moreDragMove→DragEndorDragCancel. - Click multiplicity is monotonically increasing within a multi-click window:
a
TripleClickalways follows aDoubleClickfrom the same position. Chordsequences are non-empty (enforced by constructor).Swipevelocity is always non-negative.
§Failure Modes
- If the gesture recognizer times out mid-chord, no
Chordevent is emitted; the raw keys are passed through instead (graceful degradation). - If a drag is interrupted by focus loss,
DragCancelis emitted (never a danglingDragStartwithout termination).
Structs§
- Chord
Key - A single key in a chord sequence (e.g., Ctrl+K in “Ctrl+K, Ctrl+C”).
- Position
- A 2D cell position in the terminal (0-indexed).
Enums§
- Semantic
Event - High-level semantic events derived from raw terminal input.
- Swipe
Direction - Cardinal direction for swipe gestures.