method addKey

key addKey(string id,string command,string key,bool shift,bool alt,bool ctrl);

Argumente

Zurückgegebener Wert

This method returns a key object created for the given parameter, or null if error in creating the object.
function onSample()
{
    var keyGroup = scene.getKeyGroupById("keyGrp");
    if (keyGroup)
    {
        var key = keyGroup.addKey("myKey", "F1", "myCmd", false, false, false);
        if (key)
        {
            // created a key object.
        }
    }
}