Private
_bindPrivate
_keyPrivate
_keyPrivate
_pressedFor a macOs bug workaround
Private
_touchesWhen this is false, the context menu will be prevented from opening if there is a binding to the right mouse button.
When disabled, no binding events will fire.
Event emitter for binding press events. The original mouse or key event will be passed as an argument.
The HTMLElement that inputs
is bound to.
Optional filter function. Useful if you want to, e.g., ignore a key binding if ctrl/alt are pressed, but allow that same binding if it originated from a mouse event.
Numeric counters representing accumulated pointer/scroll inputs
since the last time tick
was called.
How many times each binding has been pressed
since the last time tick
was called.
When true, all key events with bindings will call preventDefaults
.
How many times each binding has been released
since the last time tick
was called.
The boolean state of whether each binding is currently pressed.
inputs.state['move-left'] // true if a bound key is pressed
When true, all key events with bindings will call stopPropagation
.
Event emitter for binding release events. The original mouse or key event will be passed as an argument.
Generated using TypeDoc
Simple inputs manager to abstract key/mouse inputs.