method addKeyEventHandler

bool addKeyEventHandler(string event,string keyCode,string action,bool ctrl,bool alt,bool shift);

Argumente

Zurückgegebener Wert

This method sets up a reaction for a key event (keyUp, keyDown, etc...). The action associated with this event, specified by the aAction parameter, is only executed if the key modifiers are in the state specified. Key modifiers are the Shift, Ctrl and Alt key states.
var box = scene.getBoxById("genericItem1");
if (box)
{
    box.addKeyEventHandler("keyUp", "ENTER", "OnShowItemProps();", false, true, false);
}