Adds some methods for creating shortcuts to the Keyboard Class.
Associates a event handler with a name and description.
myKeyboard.addShortcut('save', { 'keys': 'ctrl+s', 'description': 'Save the current document', 'handler': doSaveFunc });
Same as addShortcut but can send many as key, value pairs.
myKeyboard.addShortcut({ 'save', { 'keys': 'ctrl+s', 'description': 'Save the current document', 'handler': doSaveFunc }, 'open', { 'keys': 'ctrl+o', 'description': 'Open a document', 'handler': doOpenFunc } });
Gets all shortcuts on the Keyboard instance.
myKeyboard.getShortcuts();
Get a shortcut with the name passed in.
myKeyboard.getShortcut('save');
Unbinds the shortcuts passed in and rebinds them to the keys that are passed in.
myKeyboard.rebind('shift+s', shortcutObjs);
Gets all active shortcuts using the passed in Keyboard or Keyboard.manager as a starting point.
myKeyboard.getActiveShortcuts();
Goes through all active keyboards using the passed in keyboard or Keyboard.manager as a starting point and attempts to find a shortcut with the name passed in.
Keyboard.getShortcut('save');
Same as Keyboard.getShortcut but gets all that match the name.
myKeyboard.getShortcuts('save');
This documentation is released under a Attribution-NonCommercial-ShareAlike 3.0 License.