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 negKeystring The key or character to represent the negative end of the axis.
posKeystring The key or character to represent the positive end of the axis.
actionThe action to map the axis on.
rangenumber <optional>
The maximum value the key represents. Defaults to 1.
-
unmap()
-