()
| 81 | export const keyBoardEventTarget = null; |
| 82 | |
| 83 | export 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 |