Zum Hauptinhalt springen

addShortcut

Description

Fügt eine neue Tastenkombination hinzu

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

Parameters

  • shortcut - (required) string - der Tastenname oder der Name der Tastenkombination für einen Shortcut shortcut syntax
  • handler - (required) function - der Handler des Shortcuts-Aufrufs

Example

gantt.addShortcut("shift+w", function(e){ 
var task = gantt.locate(e);
if(task)
gantt.showQuickInfo(task)
},"taskRow");

Details

Hinweis

Diese Methode ist in der Erweiterung keyboard_navigation definiert, daher müssen Sie das keyboard_navigation Plugin aktivieren. Lesen Sie die Details im Artikel Keyboard Navigation.

Hinzugefügt in Version 4.1

Falls der dritte Parameter nicht gesetzt ist, wird der Handler dem Gantt-Scope zugeordnet.

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.