Keyboard class

Signature:

export default class Keyboard extends Input 

Extends: Input

Constructors

ConstructorDescription
(constructor)(viewer)Constructs a new instance of the Keyboard class

Properties

PropertyModifiersDescription
keyThe current key.
keyCodeThe current key code.
repeatWhether the key is held.

Methods

MethodDescription
addKeyDownListener(reaction, name)Add key down event listener.
addKeyUpListener(reaction, name)Add key up event listener.
destroy()Release all resources in the keyboard object.