Class Keyboard
Defined in: input.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Keyboard()
Creates an instance of the Keyboard object
|
Field Attributes | Field Name and Description |
---|---|
<static> |
Keyboard.e
Keyboard event.
|
<static> |
Keyboard.keys
Keyboard key array.
|
<static> |
Keyboard.keyunicode
Keyboard key code.
|
Method Attributes | Method Name and Description |
---|---|
addCustomEvents(onkeydown, onkeyup)
Setup links to custom events outside the Keyboard object.
|
|
Setup links to events inside the Keyboard object.
|
|
Return keyboard array of key codes.
|
|
onkeydown(e)
Key down function.
|
|
onkeyup(e)
Key up function.
|
Field Detail
<static>
{Event}
Keyboard.e
Keyboard event.
<static>
{Array}
Keyboard.keys
Keyboard key array.
<static>
{Number}
Keyboard.keyunicode
Keyboard key code.
Method Detail
addCustomEvents(onkeydown, onkeyup)
Setup links to custom events outside the Keyboard object.
- Parameters:
- {Object} onkeydown
- Key down event reference.
- {Object} onkeyup
- Key up event reference.
addEvents()
Setup links to events inside the Keyboard object.
{Array}
getKeyArray()
Return keyboard array of key codes.
- Returns:
- {Array} Array of keyboard key codes.
onkeydown(e)
Key down function.
- Parameters:
- {Event} e
- Key down event.
onkeyup(e)
Key up function.
- Parameters:
- {Event} e
- Key up event.