Methods
addDownListener(key, listener)
Add keydown listener.
Parameters:
| Name | Type | Description |
|---|---|---|
key |
string | String representation of key. See the KeyboardEvent.key values. |
listener |
module:hcje/device~KeyEventListener | Listener for the key press. |
removeDownListener(key)
Remove keydown listener previously added via a call to addDownListener.
Parameters:
| Name | Type | Description |
|---|---|---|
key |
string | String representation of key. |
(static) simulateKeydown(key, dispatcheropt)
Dispatch a virtual key down event.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
key |
string | String representation of key. See the KeyboardEvent.key values. |
||
dispatcher |
EventTarget |
<optional> |
window | Event target used to dispatch the event. |