shortcuts (Namespace)

Description

Shortcuts

Methods

.add(shortcut, name, callback) → {Object}



    

Add a callback to a shortcut with given name.

// Add a callback to ESC key with "component" name.
ch.shortcuts.add(ch.onkeyesc, 'component', component.hide);

.off(name) → {Object}



    

Turn off shortcuts associated to a given name.

  • name - String : A given name from the collection.
// Turn off shortcuts associated to "component" name.
ch.shortcuts.off('component');

.on(name) → {Object}



    

Turn on shortcuts associated to a given name.

  • name - String : A given name from the collection.
// Turn on shortcuts associated to "component" name.
ch.shortcuts.on('component');

.remove(name, shortcut, callback) → {Object}



    

Removes a callback from a shortcut with given name.

// Remove a callback from ESC key with "component" name.
ch.shortcuts.remove(ch.onkeyesc, 'component', component.hide);