keyTracker: true
in the .playground()
function. Then at any moment you can simply use the array $.gameQuery.keyTracker
to access the state of the keys, for example: since 65 is the keycode for 'a' you can check the value of $.gameQuery.keyTracker[65]
and if it's true then the 'a' key is pressed!It looks like you're new here. If you want to get involved, click one of these buttons!