API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classKeyEvent

@codexo/exojs / input / stable

Envelope dispatched by `app.interaction` to the focused RenderNode for keyboard input, then bubbled up its entire parent chain - same DOM-style shape as InteractionEvent: `target` stays pinned to the focused node while `currentTarget` advances to each ancestor, whether or not that ancestor is itself focusable. A handler may call KeyEvent.stopPropagation to halt the bubble early, e.g. a panel listening for `Escape` from any of its focused descendants without each one needing its own handler. `channel` is the input channel of the key - compare it with the `Keyboard` constants (e.g. `event.channel === Keyboard.Enter`). A handler may call KeyEvent.preventDefault to suppress ExoJS's own built-in handling for this key (currently `Tab` focus traversal), letting the focused widget consume the key itself. It affects engine behaviour only - the browser's own default was already decided synchronously when the platform event arrived, long before this envelope was dispatched.

6
props
2
methods
0
events
Import
import { KeyEvent } from '@codexo/exojs'

Envelope dispatched by `app.interaction` to the focused RenderNode for keyboard input, then bubbled up its entire parent chain - same DOM-style shape as InteractionEvent: `target` stays pinned to the focused node while `currentTarget` advances to each ancestor, whether or not that ancestor is itself focusable. A handler may call KeyEvent.stopPropagation to halt the bubble early, e.g. a panel listening for `Escape` from any of its focused descendants without each one needing its own handler.

`channel` is the input channel of the key - compare it with the `Keyboard` constants (e.g. `event.channel === Keyboard.Enter`).

A handler may call KeyEvent.preventDefault to suppress ExoJS's own built-in handling for this key (currently `Tab` focus traversal), letting the focused widget consume the key itself. It affects engine behaviour only - the browser's own default was already decided synchronously when the platform event arrived, long before this envelope was dispatched.

Constructors1
Methods2
preventDefault(): void
Suppress ExoJS's built-in handling (e.g. Tab traversal) for this key. Never affects the browser.
stopPropagation(): void
Halt further bubbling up the parent chain for this event.
Properties6
channel: number
Input channel of the key - compare with the Keyboard.* channel constants.
defaultPrevented: boolean
propagationStopped: boolean
Source