tecs.platform.events

Typed platform events produced by the Rust host.

Every kind is its own nupp.events declaration, so a world delivers a key press to the observers of KeyDown and nothing else, and the twelve shapes the kinds share are unions of the declarations that carry them. Kind strings are a stable external data surface used by recordings and tools. Rust translates winit events into these records and passes one ordered batch to tecs.application.Application:iterate.

Module contents

Types

TypeKindDescription
EventtypeAn event in one sealed host batch.
FingerCanceledrecordA touch the platform cancelled.
FingerDownrecordA finger touching the surface.
FingerMotionrecordA finger moving on the surface.
FingerUprecordA finger leaving the surface.
FocusEventtypeA window focus transition.
GamepadAddedrecordA gamepad appearing.
GamepadAxisrecordA gamepad axis reading.
GamepadAxisEventtypeA gamepad axis reading.
GamepadButtonDownrecordA gamepad button going down.
GamepadButtonEventtypeA gamepad button transition.
GamepadButtonUprecordA gamepad button coming up.
GamepadDeviceEventtypeA gamepad appearing or going away.
GamepadRemovedrecordA gamepad going away.
KeyDownrecordA key going down.
KeyEventtypeA physical and logical keyboard transition.
KeyUprecordA key coming up.
KindtypeA platform event kind supported by the Rust host.
MouseDownrecordA pointer button going down.
MouseMotionrecordAn absolute pointer position and optional relative movement.
MouseUprecordA pointer button coming up.
MouseWheelrecordA normalized pointer wheel movement.
PointerButtonEventtypeA pointer button transition.
PointerMoveEventtypeAn absolute pointer position and optional relative movement.
QuitrecordA process quit request.
QuitEventtypeA process or window close request.
ResizeEventtypeA logical window size change.
TextEventtypeText committed by the platform input method.
TextInputrecordText committed by the platform input method.
TouchEventtypeOne finger on a touch surface.
WheelEventtypeA normalized pointer wheel movement.
WindowCloseRequestedrecordA close request for one window.
WindowFocusGainedrecordA window gaining focus.
WindowFocusLostrecordA window losing focus.
WindowResizedrecordA logical window resize.
WindowScaleChangedrecordA scale-factor change with the resulting logical size.

Functions

FunctionKindDescription
closeRequestedfunctionConstructs a close request for one window.
dispatchfunctionDelivers one translated event to the world's observers of its kind.
focusedfunctionConstructs a window focus transition.
gamepadAxisfunctionConstructs a gamepad axis reading.
gamepadButtonfunctionConstructs a gamepad button transition.
gamepadDevicefunctionConstructs a gamepad appearing or going away.
keyfunctionConstructs a keyboard transition.
kindsfunctionReturns every platform event kind, in the union's declared order.
pointerButtonfunctionConstructs a pointer button transition.
pointerMovedfunctionConstructs an absolute pointer movement.
quitfunctionConstructs a process or window close request.
resizedfunctionConstructs a logical window resize.
scaleChangedfunctionConstructs a scale-factor change with the resulting logical size.
textfunctionConstructs committed text input.
touchfunctionConstructs one finger's transition or movement.
wheelfunctionConstructs normalized pointer wheel movement.

Types#

Eventtype#

An event in one sealed host batch.

FingerCanceledrecord#

record FingerCanceled
    kind: "fingerCanceled"
    timestamp: number
    sequence: integer
    window: integer
    touchDevice: string
    finger: string
    x: number
    y: number
    dx: number
    dy: number
    normalX: number
    normalY: number
    pressure: number
    down: boolean
end
@derive(events.Event)@event(name="tecs.platform.events.fingerCanceled")

A touch the platform cancelled.

Fields

kind#
kind: "fingerCanceled"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
touchDevice#
touchDevice: string
finger#
finger: string
x#
x: number
y#
y: number
dx#
dx: number
dy#
dy: number
normalX#
normalX: number
normalY#
normalY: number
pressure#
pressure: number
down#
down: boolean

FingerDownrecord#

record FingerDown
    kind: "fingerDown"
    timestamp: number
    sequence: integer
    window: integer
    touchDevice: string
    finger: string
    x: number
    y: number
    dx: number
    dy: number
    normalX: number
    normalY: number
    pressure: number
    down: boolean
end
@derive(events.Event)@event(name="tecs.platform.events.fingerDown")

A finger touching the surface.

Fields

kind#
kind: "fingerDown"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
touchDevice#
touchDevice: string
finger#
finger: string
x#
x: number
y#
y: number
dx#
dx: number
dy#
dy: number
normalX#
normalX: number
normalY#
normalY: number
pressure#
pressure: number
down#
down: boolean

FingerMotionrecord#

record FingerMotion
    kind: "fingerMotion"
    timestamp: number
    sequence: integer
    window: integer
    touchDevice: string
    finger: string
    x: number
    y: number
    dx: number
    dy: number
    normalX: number
    normalY: number
    pressure: number
    down: boolean
end
@derive(events.Event)@event(name="tecs.platform.events.fingerMotion")

A finger moving on the surface.

Fields

kind#
kind: "fingerMotion"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
touchDevice#
touchDevice: string
finger#
finger: string
x#
x: number
y#
y: number
dx#
dx: number
dy#
dy: number
normalX#
normalX: number
normalY#
normalY: number
pressure#
pressure: number
down#
down: boolean

FingerUprecord#

record FingerUp
    kind: "fingerUp"
    timestamp: number
    sequence: integer
    window: integer
    touchDevice: string
    finger: string
    x: number
    y: number
    dx: number
    dy: number
    normalX: number
    normalY: number
    pressure: number
    down: boolean
end
@derive(events.Event)@event(name="tecs.platform.events.fingerUp")

A finger leaving the surface.

Fields

kind#
kind: "fingerUp"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
touchDevice#
touchDevice: string
finger#
finger: string
x#
x: number
y#
y: number
dx#
dx: number
dy#
dy: number
normalX#
normalX: number
normalY#
normalY: number
pressure#
pressure: number
down#
down: boolean

FocusEventtype#

A window focus transition.

Whichever kind carries this shape; an observer written against it fits any of them.

GamepadAddedrecord#

record GamepadAdded
    kind: "gamepadAdded"
    timestamp: number
    sequence: integer
    window: integer
    which: integer
end
@derive(events.Event)@event(name="tecs.platform.events.gamepadAdded")

A gamepad appearing.

Fields

kind#
kind: "gamepadAdded"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
which#
which: integer

GamepadAxisrecord#

record GamepadAxis
    kind: "gamepadAxis"
    timestamp: number
    sequence: integer
    window: integer
    which: integer
    axis: integer
    value: number
end
@derive(events.Event)@event(name="tecs.platform.events.gamepadAxis")

A gamepad axis reading.

Fields

kind#
kind: "gamepadAxis"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
which#
which: integer
axis#
axis: integer
value#
value: number

GamepadAxisEventtype#

type GamepadAxisEvent = GamepadAxis

A gamepad axis reading.

GamepadButtonDownrecord#

record GamepadButtonDown
    kind: "gamepadButtonDown"
    timestamp: number
    sequence: integer
    window: integer
    which: integer
    button: integer
    down: boolean
end
@derive(events.Event)@event(name="tecs.platform.events.gamepadButtonDown")

A gamepad button going down.

Fields

kind#
kind: "gamepadButtonDown"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
which#
which: integer
button#
button: integer
down#
down: boolean

GamepadButtonEventtype#

type GamepadButtonEvent = GamepadButtonDown | GamepadButtonUp

A gamepad button transition.

Whichever kind carries this shape; an observer written against it fits any of them.

GamepadButtonUprecord#

record GamepadButtonUp
    kind: "gamepadButtonUp"
    timestamp: number
    sequence: integer
    window: integer
    which: integer
    button: integer
    down: boolean
end
@derive(events.Event)@event(name="tecs.platform.events.gamepadButtonUp")

A gamepad button coming up.

Fields

kind#
kind: "gamepadButtonUp"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
which#
which: integer
button#
button: integer
down#
down: boolean

GamepadDeviceEventtype#

type GamepadDeviceEvent = GamepadAdded | GamepadRemoved

A gamepad appearing or going away.

Compatibility surface: which names the device rather than the window. window is zero because a gamepad belongs to no window.

Whichever kind carries this shape; an observer written against it fits any of them.

GamepadRemovedrecord#

record GamepadRemoved
    kind: "gamepadRemoved"
    timestamp: number
    sequence: integer
    window: integer
    which: integer
end
@derive(events.Event)@event(name="tecs.platform.events.gamepadRemoved")

A gamepad going away.

Fields

kind#
kind: "gamepadRemoved"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
which#
which: integer

KeyDownrecord#

record KeyDown
    kind: "keyDown"
    timestamp: number
    sequence: integer
    window: integer
    physicalKey: string
    logicalKey: string?
    text: string?
    modifiers: integer
    repeated: boolean
    down: boolean
end
@derive(events.Event)@event(name="tecs.platform.events.keyDown")

A key going down.

Fields

kind#
kind: "keyDown"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
physicalKey#
physicalKey: string
logicalKey#
logicalKey: string?
text#
text: string?
modifiers#
modifiers: integer
repeated#
repeated: boolean
down#
down: boolean

KeyEventtype#

type KeyEvent = KeyDown | KeyUp

A physical and logical keyboard transition.

Whichever kind carries this shape; an observer written against it fits any of them.

KeyUprecord#

record KeyUp
    kind: "keyUp"
    timestamp: number
    sequence: integer
    window: integer
    physicalKey: string
    logicalKey: string?
    text: string?
    modifiers: integer
    repeated: boolean
    down: boolean
end
@derive(events.Event)@event(name="tecs.platform.events.keyUp")

A key coming up.

Fields

kind#
kind: "keyUp"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
physicalKey#
physicalKey: string
logicalKey#
logicalKey: string?
text#
text: string?
modifiers#
modifiers: integer
repeated#
repeated: boolean
down#
down: boolean

Kindtype#

type Kind = "quit"
| "windowCloseRequested"
| "windowResized"
| "windowScaleChanged"
| "windowFocusGained"
| "windowFocusLost"
| "keyDown"
| "keyUp"
| "mouseMotion"
| "mouseDown"
| "mouseUp"
| "mouseWheel"
| "textInput"
| "fingerDown"
| "fingerUp"
| "fingerMotion"
| "fingerCanceled"
| "gamepadAdded"
| "gamepadRemoved"
| "gamepadButtonDown"
| "gamepadButtonUp"
| "gamepadAxis"

A platform event kind supported by the Rust host.

MouseDownrecord#

record MouseDown
    kind: "mouseDown"
    timestamp: number
    sequence: integer
    window: integer
    x: number
    y: number
    button: integer
    clicks: integer
    down: boolean
end
@derive(events.Event)@event(name="tecs.platform.events.mouseDown")

A pointer button going down.

Fields

kind#
kind: "mouseDown"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
x#
x: number
y#
y: number
button#
button: integer
clicks#
clicks: integer
down#
down: boolean

MouseMotionrecord#

record MouseMotion
    kind: "mouseMotion"
    timestamp: number
    sequence: integer
    window: integer
    x: number
    y: number
    dx: number
    dy: number
end
@derive(events.Event)@event(name="tecs.platform.events.mouseMotion")

An absolute pointer position and optional relative movement.

Fields

kind#
kind: "mouseMotion"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
x#
x: number
y#
y: number
dx#
dx: number
dy#
dy: number

MouseUprecord#

record MouseUp
    kind: "mouseUp"
    timestamp: number
    sequence: integer
    window: integer
    x: number
    y: number
    button: integer
    clicks: integer
    down: boolean
end
@derive(events.Event)@event(name="tecs.platform.events.mouseUp")

A pointer button coming up.

Fields

kind#
kind: "mouseUp"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
x#
x: number
y#
y: number
button#
button: integer
clicks#
clicks: integer
down#
down: boolean

MouseWheelrecord#

record MouseWheel
    kind: "mouseWheel"
    timestamp: number
    sequence: integer
    window: integer
    x: number
    y: number
    wheelX: number
    wheelY: number
    wheelTicksX: integer
    wheelTicksY: integer
end
@derive(events.Event)@event(name="tecs.platform.events.mouseWheel")

A normalized pointer wheel movement.

Fields

kind#
kind: "mouseWheel"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
x#
x: number
y#
y: number
wheelX#
wheelX: number
wheelY#
wheelY: number
wheelTicksX#
wheelTicksX: integer
wheelTicksY#
wheelTicksY: integer

PointerButtonEventtype#

type PointerButtonEvent = MouseDown | MouseUp

A pointer button transition.

Whichever kind carries this shape; an observer written against it fits any of them.

PointerMoveEventtype#

type PointerMoveEvent = MouseMotion

An absolute pointer position and optional relative movement.

Quitrecord#

record Quit
    kind: "quit"
    timestamp: number
    sequence: integer
    window: integer
end
@derive(events.Event)@event(name="tecs.platform.events.quit")

A process quit request.

Fields

kind#
kind: "quit"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer

QuitEventtype#

type QuitEvent = Quit | WindowCloseRequested

A process or window close request.

Whichever kind carries this shape; an observer written against it fits any of them.

ResizeEventtype#

type ResizeEvent = WindowResized | WindowScaleChanged

A logical window size change.

Whichever kind carries this shape; an observer written against it fits any of them.

TextEventtype#

type TextEvent = TextInput

Text committed by the platform input method.

TextInputrecord#

record TextInput
    kind: "textInput"
    timestamp: number
    sequence: integer
    window: integer
    text: string
end
@derive(events.Event)@event(name="tecs.platform.events.textInput")

Text committed by the platform input method.

Fields

kind#
kind: "textInput"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
text#
text: string

TouchEventtype#

One finger on a touch surface.

Compatibility surface: touchDevice and finger are stable field names, and both stay strings because a device and a finger are 64-bit identities that a Lua number would round together.

Whichever kind carries this shape; an observer written against it fits any of them.

WheelEventtype#

type WheelEvent = MouseWheel

A normalized pointer wheel movement.

WindowCloseRequestedrecord#

record WindowCloseRequested
    kind: "windowCloseRequested"
    timestamp: number
    sequence: integer
    window: integer
end
@derive(events.Event)@event(name="tecs.platform.events.windowCloseRequested")

A close request for one window.

Fields

kind#
kind: "windowCloseRequested"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer

WindowFocusGainedrecord#

record WindowFocusGained
    kind: "windowFocusGained"
    timestamp: number
    sequence: integer
    window: integer
    focused: boolean
end
@derive(events.Event)@event(name="tecs.platform.events.windowFocusGained")

A window gaining focus.

Fields

kind#
kind: "windowFocusGained"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
focused#
focused: boolean

WindowFocusLostrecord#

record WindowFocusLost
    kind: "windowFocusLost"
    timestamp: number
    sequence: integer
    window: integer
    focused: boolean
end
@derive(events.Event)@event(name="tecs.platform.events.windowFocusLost")

A window losing focus.

Fields

kind#
kind: "windowFocusLost"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
focused#
focused: boolean

WindowResizedrecord#

record WindowResized
    kind: "windowResized"
    timestamp: number
    sequence: integer
    window: integer
    width: integer
    height: integer
    pixelWidth: integer
    pixelHeight: integer
    scaleFactor: number
end
@derive(events.Event)@event(name="tecs.platform.events.windowResized")

A logical window resize.

Fields

kind#
kind: "windowResized"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
width#
width: integer
height#
height: integer
pixelWidth#
pixelWidth: integer
pixelHeight#
pixelHeight: integer
scaleFactor#
scaleFactor: number

WindowScaleChangedrecord#

record WindowScaleChanged
    kind: "windowScaleChanged"
    timestamp: number
    sequence: integer
    window: integer
    width: integer
    height: integer
    pixelWidth: integer
    pixelHeight: integer
    scaleFactor: number
end
@derive(events.Event)@event(name="tecs.platform.events.windowScaleChanged")

A scale-factor change with the resulting logical size.

Fields

kind#
kind: "windowScaleChanged"
timestamp#
timestamp: number
sequence#
sequence: integer
window#
window: integer
width#
width: integer
height#
height: integer
pixelWidth#
pixelWidth: integer
pixelHeight#
pixelHeight: integer
scaleFactor#
scaleFactor: number

Functions#

closeRequestedfunction#

function closeRequested(window: integer?, timestamp: number?, sequence: integer?): QuitEvent

Constructs a close request for one window.

Arguments

NameTypeDescription
windowinteger?
timestampnumber?
sequenceinteger?

Returns

TypeDescription
QuitEvent

dispatchfunction#

function dispatch(exclusive world: ecs.World, event: Event): nil

Delivers one translated event to the world's observers of its kind.

The host's instance is delivered as it is: nothing is copied or constructed, and observers receive it as a borrow for the call.

Arguments

NameTypeDescription
exclusive worldecs.World

the receiving world

eventEvent

the translated platform event

Returns

TypeDescription
nil

focusedfunction#

function focused(focused: boolean, window: integer?, timestamp: number?, sequence: integer?): FocusEvent

Constructs a window focus transition.

Arguments

NameTypeDescription
focusedboolean
windowinteger?
timestampnumber?
sequenceinteger?

Returns

TypeDescription
FocusEvent

gamepadAxisfunction#

function gamepadAxis(which: integer, axis: integer, value: number, timestamp: number?, sequence: integer?): GamepadAxisEvent

Constructs a gamepad axis reading.

Arguments

NameTypeDescription
whichinteger

the device identifier the backend issued

axisinteger

the axis code tecs.input resolves a name to

valuenumber

the reading from -1 to 1, with a trigger running zero to one

timestampnumber?

the host time the platform reported

sequenceinteger?

the host's ordering number for the batch

Returns

TypeDescription
GamepadAxisEvent

the constructed axis event

Raises

  • when the axis code is not positive

gamepadButtonfunction#

function gamepadButton(down: boolean, which: integer, button: integer, timestamp: number?, sequence: integer?): GamepadButtonEvent

Constructs a gamepad button transition.

Arguments

NameTypeDescription
downboolean

whether the button went down rather than came up

whichinteger

the device identifier the backend issued

buttoninteger

the positional button code tecs.input resolves a name to

timestampnumber?

the host time the platform reported

sequenceinteger?

the host's ordering number for the batch

Returns

TypeDescription
GamepadButtonEvent

the constructed button event

Raises

  • when the button code is not positive

gamepadDevicefunction#

function gamepadDevice(added: boolean, which: integer, timestamp: number?, sequence: integer?): GamepadDeviceEvent

Constructs a gamepad appearing or going away.

Arguments

NameTypeDescription
addedboolean

whether the device appeared rather than went away

whichinteger

the device identifier the backend issued

timestampnumber?

the host time the platform reported

sequenceinteger?

the host's ordering number for the batch

Returns

TypeDescription
GamepadDeviceEvent

the constructed device event

keyfunction#

function key(down: boolean, physicalKey: string, logicalKey: string?, text: string?, modifiers: integer?, repeated: boolean?, window: integer?, timestamp: number?, sequence: integer?): KeyEvent

Constructs a keyboard transition.

Arguments

NameTypeDescription
downboolean
physicalKeystring
logicalKeystring?
textstring?
modifiersinteger?
repeatedboolean?
windowinteger?
timestampnumber?
sequenceinteger?

Returns

TypeDescription
KeyEvent

kindsfunction#

function kinds(): {string}

Returns every platform event kind, in the union's declared order.

Compatibility surface: each string is the externally typed kind an agent names over the debug protocol, so the spellings here are the same ones Kind declares and must not change with a module move. The union is a type and cannot be read at run time, so a caller that needs the kinds as data reads them here rather than keeping a second copy that drifts.

Returns

TypeDescription
{string}

a fresh caller-owned list of the twenty-two kind strings

pointerButtonfunction#

function pointerButton(down: boolean, button: integer, x: number, y: number, clicks: integer?, window: integer?, timestamp: number?, sequence: integer?): PointerButtonEvent

Constructs a pointer button transition.

Arguments

NameTypeDescription
downboolean
buttoninteger
xnumber
ynumber
clicksinteger?
windowinteger?
timestampnumber?
sequenceinteger?

Returns

TypeDescription
PointerButtonEvent

pointerMovedfunction#

function pointerMoved(x: number, y: number, dx: number?, dy: number?, window: integer?, timestamp: number?, sequence: integer?): PointerMoveEvent

Constructs an absolute pointer movement.

Arguments

NameTypeDescription
xnumber
ynumber
dxnumber?
dynumber?
windowinteger?
timestampnumber?
sequenceinteger?

Returns

TypeDescription
PointerMoveEvent

quitfunction#

function quit(window: integer?, timestamp: number?, sequence: integer?): QuitEvent

Constructs a process or window close request.

Arguments

NameTypeDescription
windowinteger?
timestampnumber?
sequenceinteger?

Returns

TypeDescription
QuitEvent

resizedfunction#

function resized(width: integer, height: integer, window: integer?, scaleFactor: number?, timestamp: number?, sequence: integer?, pixelWidth: integer?, pixelHeight: integer?): ResizeEvent

Constructs a logical window resize.

Arguments

NameTypeDescription
widthinteger
heightinteger
windowinteger?
scaleFactornumber?
timestampnumber?
sequenceinteger?
pixelWidthinteger?
pixelHeightinteger?

Returns

TypeDescription
ResizeEvent

scaleChangedfunction#

function scaleChanged(scaleFactor: number, width: integer, height: integer, window: integer?, timestamp: number?, sequence: integer?, pixelWidth: integer?, pixelHeight: integer?): ResizeEvent

Constructs a scale-factor change with the resulting logical size.

Arguments

NameTypeDescription
scaleFactornumber
widthinteger
heightinteger
windowinteger?
timestampnumber?
sequenceinteger?
pixelWidthinteger?
pixelHeightinteger?

Returns

TypeDescription
ResizeEvent

textfunction#

function text(text: string, window: integer?, timestamp: number?, sequence: integer?): TextEvent

Constructs committed text input.

Arguments

NameTypeDescription
textstring
windowinteger?
timestampnumber?
sequenceinteger?

Returns

TypeDescription
TextEvent

touchfunction#

function touch(phase: "fingerDown" | "fingerUp" | "fingerMotion" | "fingerCanceled", touchDevice: string, finger: string, x: number, y: number, normalX: number?, normalY: number?, pressure: number?, dx: number?, dy: number?, window: integer?, timestamp: number?, sequence: integer?): TouchEvent

Constructs one finger's transition or movement.

x and y are in the window's logical coordinates, normalX and normalY run from zero to one across the touch surface, and pressure runs from zero to one where the surface reports it and is one where it does not.

Arguments

NameTypeDescription
phase"fingerDown" | "fingerUp" | "fingerMotion" | "fingerCanceled"

the finger's transition, spelled as the event kind

touchDevicestring

the touch surface's opaque identity

fingerstring

the finger's opaque identity on that surface

xnumber

the position in logical window coordinates

ynumber

the position in logical window coordinates

normalXnumber?

the position across the surface, from zero to one

normalYnumber?

the position down the surface, from zero to one

pressurenumber?

the reported pressure from zero to one

dxnumber?

the movement since the previous event, in logical coordinates

dynumber?

the movement since the previous event, in logical coordinates

windowinteger?

the window the touch is over

timestampnumber?

the host time the platform reported

sequenceinteger?

the host's ordering number for the batch

Returns

TypeDescription
TouchEvent

the constructed touch event

Raises

  • when the finger identity is empty

wheelfunction#

function wheel(wheelX: number, wheelY: number, ticksX: integer?, ticksY: integer?, x: number?, y: number?, window: integer?, timestamp: number?, sequence: integer?): WheelEvent

Constructs normalized pointer wheel movement.

Arguments

NameTypeDescription
wheelXnumber
wheelYnumber
ticksXinteger?
ticksYinteger?
xnumber?
ynumber?
windowinteger?
timestampnumber?
sequenceinteger?

Returns

TypeDescription
WheelEvent