MCPcopy Create free account
hub / github.com/melonjs/melonJS / triggerKeyEvent

Function triggerKeyEvent

packages/melonjs/src/input/keyboard.ts:139–146  ·  view source on GitHub ↗
(
	keyCode: number,
	status: boolean,
	mouseButton?: number,
)

Source from the content-addressed store, hash-verified

137 * @category Input
138 */
139export function triggerKeyEvent(
140 keyCode: number,
141 status: boolean,
142 mouseButton?: number,
143) {
144 const handler = status ? keyDownEvent : keyUpEvent;
145 handler({ keyCode, mouseButton });
146}
147
148/**
149 * associate a user defined action to a keycode

Callers 2

onPointerEventFunction · 0.90
updateGamepadsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected