LzKeys
出自OpenFace
目录 |
LzKeys
Keyboard input service. This service handles keyboard input events.
Here is a simple example:
Example 1. LzKeys
<canvas height="140" efcdebug="true">
<view width="20" height="20" bgcolor="red">
<handler name="onkeydown" reference="LzKeys">
Debug.write("@@@key " + key + " down");
</handler>
</view>
</canvas>
Methods
getKey()
LzKeys.getKey()
Returns Type Desc [Number] convert the key value of pc to that of cell phone. In onkeydown handler, to get the key pressed, we must call this method with the handler argument. The return value of this method may be: LzKeys.VK_0, LzKeys.VK_1, LzKeys.VK_2, LzKeys.VK_3, LzKeys.VK_4, LzKeys.VK_5, LzKeys.VK_6, LzKeys.VK_7, LzKeys.VK_8, LzKeys.VK_9, LzKeys.VK_UP, LzKeys.VK_DOWN, LzKeys.VK_LEFT, LzKeys.VK_RIGHT, LzKeys.VK_LF, LzKeys.VK_RF, LzKeys.VK_OK.
Events
Name Description
onkeydown None

