Skip to main content

addShortcut

Description

Adds a new keyboard shortcut

addShortcut: (shortcut: string, handler: SchedulerCallback, scope?: string) => void

Parameters

  • shortcut - (required) string - the key name or the name of keys combination for a shortcut (shortcut syntax)
  • handler - (required) function - the handler of the shortcut call
  • scope - (optional) string - 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");

Details

added in version 4.4

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

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.