Keyboard

Module: engine.input

Keyboard controller. Instance automatically created at game.keyboard

Properties

_keysDown Array

(No description yet)

Methods

_keydown(event)

(No description yet)

Parameters:

  • event KeyboardEvent
_keyup(event)

(No description yet)

Parameters:

  • event KeyboardEvent
_reset()

(No description yet)

down(key) Boolean

Check if key is pressed down.

Parameters:

  • key String

Attributes

keys Object

List of key codes and their key names. Key events are not called to key codes, that are not in the list.

preventDefault Boolean (Default: false)

Should keydown event prevent default action.