property keyCode

(r/o) int32 keyCode;

Typ

Zugriff

This property returns the key code (this is the translated unicode character base on the current keyboard state).
<box>
    <reaction event="keyPress" keyCode="97" action="onKeyPress();"/>
</box>

function onKeyPress()
{
    var eventObj = shell.currentEvent;
    if (eventObj)
    {
        var keyCode = eventObj.keyCode;
        // keyCode == 97 (0x61), which maps to character "a".
        // use keyCode to find the character in unicode character set.
    }
}