getShortcutHandler
Description
Gets a key navigation shortcut handler
getShortcutHandler: (shortcut: string, scope: string) => GanttCallback
Parameters
shortcut- (required) string - the key name or the name of keys combination for a shortcut (shortcut syntax)scope- (required) string - the name of the context element to attach the handler function to (list of scopes)
Returns
shortcut_handler- (function) - the handler of the shortcut call
Example
gantt.addShortcut("shift+w", function(e){
const task = gantt.locate(e);
if(task)
gantt.showQuickInfo(task)
},"taskRow");
gantt.getShortcutHandler("shift+w", "taskRow")
Related samples
Details
note
This method is defined in the keyboard_navigation extension, so you need to activate the keyboard_navigation plugin. Read the details in the Keyboard Navigation article.
added in version 4.2