keys

description

object containing data about the keyboard.

each of the object’s keys is a key returned by KeyboardEvent.key. each value is an object with the following properties:

the press property of each key does not reset on its own. they should be manually set to false at the end of your game loop; each keypress detected will then cause them to return true for exactly one frame.