Skip to content

@ue-too/board / KMTEventParser

Interface: KMTEventParser

Defined in: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:19

Interface for KMT (Keyboard/Mouse/Trackpad) event parsers.

Remarks

Event parsers bridge the gap between DOM events and the state machine. They listen for raw DOM events, convert them to state machine events, and coordinate with the orchestrator for output processing.

Properties

disabled

disabled: boolean

Defined in: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:21

Whether the parser is currently disabled

Methods

attach()

attach(canvas): void

Defined in: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:27

Attaches to a new canvas element

Parameters

canvas

HTMLCanvasElement

Returns

void


disable()

disable(): void

Defined in: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:29

Disables the parser; the event listeners are still attached just not processing any events

Returns

void


enable()

enable(): void

Defined in: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:31

Enables the parser

Returns

void


setUp()

setUp(): void

Defined in: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:23

Initializes event listeners

Returns

void


tearDown()

tearDown(): void

Defined in: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:25

Removes event listeners and cleans up

Returns

void