Primitives / Events
foldkit-primitives/events
Raw window events. Four bundles keep a stored fact (Visibility,
WindowSize, Idle, InputModality); four entries report keys, pointer
moves, scrolls, and focus, and the parent keeps whatever it wants of them.
Anything scoped to one element belongs to a Mount in observers
or dom, not to these window-level streams.
(source)
| Name | Form | Model | Messages | Args |
|---|---|---|---|---|
Visibility | bundle | { visible } | Changed { visible } | none |
WindowSize | bundle | { width, height } | Changed { width, height } | none |
Idle | bundle | { idle } | BecameIdle, BecameActive | { timeoutMs } |
InputModality | bundle | { modality } | Changed { modality } | none |
keyboardEvents({ preventDefault? }) | entry | Pressed { key, repeat, ctrl, shift, alt, meta }, Released { key } | ||
pointerEvents() | entry | Moved { x, y } | ||
scrollEvents() | entry | Scrolled { x, y } | ||
activeElementEvents() | entry | Changed { tag, id } | ||
matchHotkey(pattern, press) | function |