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

Function initKeyboardEvent

packages/melonjs/src/input/keyboard.ts:83–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81export const keyBoardEventTarget = null;
82
83export function initKeyboardEvent() {
84 if (typeof globalThis.addEventListener === "function") {
85 globalThis.addEventListener(
86 "keydown",
87 (e) => {
88 keyDownEvent(e);
89 },
90 false,
91 );
92 globalThis.addEventListener("keyup", keyUpEvent, false);
93 }
94}
95
96/**
97 * return the key press status of the specified action

Callers 1

bootFunction · 0.90

Calls 1

keyDownEventFunction · 0.85

Tested by

no test coverage detected