@jsvision/core / MouseEvent
Interface: MouseEvent
Defined in: input/events.ts:35
A mouse button/motion report. Coordinates are 1-based, exactly as the terminal sends them.
The ctrl/alt/shift flags report the modifiers held during the report, decoded from the SGR button byte — they let a click handler distinguish, e.g., a plain click from a Ctrl+click. They are optional and populated only on decoded events; a hand-built MouseEvent literal that omits them reads as an unmodified press (undefined → falsy). Modifier reporting is best-effort per terminal — some terminals intercept combinations such as Ctrl+click for their own use.
Properties
alt?
readonlyoptionalalt?:boolean
Defined in: input/events.ts:44
Meta/Alt held during the report.
button
readonlybutton:number
Defined in: input/events.ts:38
ctrl?
readonlyoptionalctrl?:boolean
Defined in: input/events.ts:42
Ctrl held during the report (from the SGR button byte).
kind
readonlykind:"drag"|"down"|"up"|"move"
Defined in: input/events.ts:37
shift?
readonlyoptionalshift?:boolean
Defined in: input/events.ts:46
Shift held during the report.
type
readonlytype:"mouse"
Defined in: input/events.ts:36
x
readonlyx:number
Defined in: input/events.ts:39
y
readonlyy:number
Defined in: input/events.ts:40