five-on-it / apps/client/src/renderer/keyboard / createKeyboard
Function: createKeyboard()
createKeyboard(
canvas,claimed?):Keyboard
Defined in: apps/client/src/renderer/keyboard.ts:40
Listens on window, so the page needs no focus, and takes the presses meant for the game on canvas (see the module documentation); claimed says whether the in-game UI took a press (its handlers on the canvas run before this one, on the window).
Parameters
canvas
HTMLCanvasElement
claimed?
(event) => boolean