feat: basic terminal printing
This commit is contained in:
5
src/input/keyboard.ts
Normal file
5
src/input/keyboard.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
// creates keyboard listeners
|
||||
export const CreateKeyboardListeners = (onKeyDown: (key: string) => void, onKeyUp: (key: string) => void) => {
|
||||
document.addEventListener('keydown', event => onKeyDown(event.key))
|
||||
document.addEventListener('keyup', event => onKeyUp(event.key))
|
||||
}
|
||||
Reference in New Issue
Block a user