new Keyboard()
Properties:
Name | Type | Description |
---|---|---|
mode |
Keyboard.MODE_KEY_VALUE | If {@see KeyboardEvent#code} {@see KeyboardEvent#key} |
Methods
-
mapAxis(negKey, posKey, action [, range])
-
Maps two keys to represent an axis. For example mapping "ArrowLeft" and "ArrowRight" can be mapped to (-1, 1).
Parameters:
Name Type Argument Description negKey
string The key or character to represent the negative end of the axis.
posKey
string The key or character to represent the positive end of the axis.
action
The action to map the axis on.
range
number <optional>
The maximum value the key represents. Defaults to 1.
-
unmap()
-