Keyboard

Keyboard input device.

Constructor

new Keyboard(id)

Parameters:
NameTypeDescription
idstring

the device ID.

Methods

(package) keyDown(key) → (non-null) {Action}

Generates a key down action.

Parameters:
NameTypeDescription
keyKey | string | number

the key to press. This key may be specified as a Key value, a specific unicode code point, or a string containing a single unicode code point.

Returns:

a new key down action.

Type: 
Action

(package) keyUp(key) → (non-null) {Action}

Generates a key up action.

Parameters:
NameTypeDescription
keyKey | string | number

the key to press. This key may be specified as a Key value, a specific unicode code point, or a string containing a single unicode code point.

Returns:

a new key up action.

Type: 
Action