new KeyboardControl(keyMapopt)
Parameters:
Name |
Type |
Attributes |
Default |
Description |
keyMap |
object
|
<optional>
|
KeyboardControl.defaultKeyMap
|
|
- Source:
Methods
addItem(name, keyList, toggleopt, initValueopt)
add a new keyboard control item
Parameters:
Name |
Type |
Attributes |
Description |
name |
string
|
|
|
keyList |
Array
|
|
|
toggle |
undefined
|
<optional>
|
when the value should be toggled, "down" or "up", undefined means it is not a toggle value |
initValue |
undefined
|
<optional>
|
the default value when no keyboard input |
- Source:
keyDown(ev)
Parameters:
Name |
Type |
Description |
ev |
KeyboardEvent
|
|
- Source:
keyUp(ev)
Parameters:
Name |
Type |
Description |
ev |
KeyboardEvent
|
|
- Source:
loadKeyMap(keyMap)
this function will not copy the object
Parameters:
Name |
Type |
Description |
keyMap |
object
|
|
- Source:
removeItem(name)
delete a keyboard control item
Parameters:
Name |
Type |
Description |
name |
string
|
|
- Source: