addShortcut

adds a new keyboard shortcut

void addShortcut(string shortcut,function handler, [string scope] );
shortcutstringthe key name or the name of keys combination for a shortcut (shortcut syntax)
handlerfunctionthe handler of the shortcut call
scopestring(optional) the name of the context element to attach the handler function to (list of scopes)

Example

scheduler.addShortcut("shift+w", function(e){ 
    var eventId = scheduler.locate(e); 
    if(eventId) 
        scheduler.showQuickInfo(eventId);
},"event");

Related samples

Details

added in version 4.4

In case the third parameter is not set, the handler will be attached to the scheduler scope.

See also
Back to top