ONE EVENT MODEL
Logical coordinates
Pointer positions are mapped back through contain, cover, or stretch before reaching your function.
CANVAS · INPUT
Interactive input
Normalize pointer, multitouch, physical keyboard, and device motion into target-neutral event objects that drive retained command bindings.
ONE EVENT MODEL
Logical coordinates
Pointer positions are mapped back through contain, cover, or stretch before reaching your function.
ADVANCED PLAYGROUND
Bind three input sources into one scene
Move or touch the marker, focus the Canvas and press a physical key, or tilt a supported mobile device to rotate the center tile.
Pointer
The blue marker follows logical x and y coordinates.
Physical keyboard
The most recent key value replaces the scene heading.
Device motion
Screen-oriented gamma rotation turns the center tile.
COMMAND BINDINGS
Store events, then resolve shallow paths
Each function receives the event as item. A command bind object replaces selected fields immediately before drawing and preserves the static fallback when a path is missing.
signal pointer value:{ x:320 y:180 }
signal scene value:[
{ type:"circle" x:320 y:180 radius:24 fill:"primary" bind:{ x:"pointer.x" y:"pointer.y" } },
]
fn capturePointer
set pointer source:item
Canvas scene:scene onPointer:capturePointer label:"Pointer playground" w:"full" h:96Source | Delivery | Selected fields |
|---|---|---|
No dataThere are no records to display | ||
LIFECYCLE AND PERMISSIONS
Input stays scoped to the active Canvas
Pointer capture
Active pointers remain captured through up or cancel, including simultaneous touch identifiers.
Keyboard focus
A Canvas with onKey becomes focusable; pointer down gives it focus without opening a software keyboard.
Motion sensors
Sensors start only when onMotion exists. Missing or denied sensor access produces no callback.