Skip to content

KeyboardProviderOptions

Defined in: src/modules/input/keyboard-provider.ts:25

Options for KeyboardProvider.

optional emit?: KeyboardEmitSource

Defined in: src/modules/input/keyboard-provider.ts:29

Field supplying the emitted code. Defaults to 'code'.


optional preventDefaultCodes?: readonly string[]

Defined in: src/modules/input/keyboard-provider.ts:37

Set of emitted values that should event.preventDefault() when handled — matched against the same field emit selects, so the list reads like the input map it belongs to. Leaving it undefined means the provider prevents the browser default for every value it emits. Pass an empty array to disable prevention entirely.


optional target?: EventTarget

Defined in: src/modules/input/keyboard-provider.ts:43

Target to attach listeners to. Defaults to window so global keyboard input works without extra wiring. Pass a focused canvas or element to scope input.