Skip to content

@ue-too/board / index / VanillaKMTEventParser

クラス: VanillaKMTEventParser ​

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:174

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.

実装 ​

コンストラクター ​

コンストラクター ​

new VanillaKMTEventParser(kmtInputStateMachine, orchestrator, canvas?): VanillaKMTEventParser

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:182

パラメータ ​

kmtInputStateMachine ​

StateMachine

orchestrator ​

InputOrchestrator

canvas? ​

HTMLCanvasElement | SVGSVGElement

戻り値 ​

VanillaKMTEventParser

プロパティ ​

_canvas? ​

protected optional _canvas: HTMLCanvasElement | SVGSVGElement

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:180

アクセッサー ​

disabled ​

署名を取得する ​

get disabled(): boolean

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:195

Whether the parser is currently disabled

戻り値 ​

boolean

Whether the parser is currently disabled

の実装 ​

KMTEventParser.disabled


stateMachine ​

署名を取得する ​

get stateMachine(): StateMachine

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:394

The state machine this parser dispatches into, when the implementation exposes one. Optional so existing external parser implementations remain valid — typed to the minimal { happens } contract this parser itself needs, so an external implementation satisfies this member without providing a full being StateMachine. Intended for tooling/introspection — dispatch through the parser, not through this reference.

戻り値 ​

StateMachine

署名を設定する ​

set stateMachine(stateMachine): void

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:398

The state machine this parser dispatches into, when the implementation exposes one. Optional so existing external parser implementations remain valid — typed to the minimal { happens } contract this parser itself needs, so an external implementation satisfies this member without providing a full being StateMachine. Intended for tooling/introspection — dispatch through the parser, not through this reference.

パラメータ ​
stateMachine ​

StateMachine

戻り値 ​

void

The state machine this parser dispatches into, when the implementation exposes one. Optional so existing external parser implementations remain valid — typed to the minimal { happens } contract this parser itself needs, so an external implementation satisfies this member without providing a full being StateMachine. Intended for tooling/introspection — dispatch through the parser, not through this reference.

の実装 ​

KMTEventParser.stateMachine

メソッド ​

addEventListeners() ​

addEventListeners(signal): void

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:207

パラメータ ​

signal ​

AbortSignal

戻り値 ​

void


attach() ​

attach(canvas): void

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:388

Attaches to a new canvas element

パラメータ ​

canvas ​

HTMLCanvasElement

戻り値 ​

void

の実装 ​

KMTEventParser.attach


bindFunctions() ​

bindFunctions(): void

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:248

戻り値 ​

void


disable() ​

disable(): void

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:199

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

戻り値 ​

void

の実装 ​

KMTEventParser.disable


enable() ​

enable(): void

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:203

Enables the parser

戻り値 ​

void

の実装 ​

KMTEventParser.enable


keypressHandler() ​

keypressHandler(e): void

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:348

パラメータ ​

e ​

KeyboardEvent

戻り値 ​

void


keyupHandler() ​

keyupHandler(e): void

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:379

パラメータ ​

e ​

KeyboardEvent

戻り値 ​

void


pointerDownHandler() ​

pointerDownHandler(e): void

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:270

パラメータ ​

e ​

PointerEvent

戻り値 ​

void


pointerMoveHandler() ​

pointerMoveHandler(e): void

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:307

パラメータ ​

e ​

PointerEvent

戻り値 ​

void


pointerUpHandler() ​

pointerUpHandler(e): void

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:290

パラメータ ​

e ​

PointerEvent

戻り値 ​

void


processEvent() ​

protected processEvent<K>(...args): void

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:257

型パラメーター ​

K ​

K extends keyof KmtInputEventMapping

パラメータ ​

args ​

...EventArgs<KmtInputEventMapping, K>

戻り値 ​

void


scrollHandler() ​

scrollHandler(e): void

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:328

パラメータ ​

e ​

WheelEvent

戻り値 ​

void


setUp() ​

setUp(): void

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:235

Initializes event listeners

戻り値 ​

void

の実装 ​

KMTEventParser.setUp


tearDown() ​

tearDown(): void

定義: packages/board/src/input-interpretation/raw-input-parser/vanilla-kmt-event-parser.ts:242

Removes event listeners and cleans up

戻り値 ​

void

の実装 ​

KMTEventParser.tearDown