combokeys
Version:
Handles keyboard shortcuts in the browser
25 lines (23 loc) • 628 B
JavaScript
/* eslint-env node, browser */
/**
* unbinds an event to Combokeys
*
* the unbinding sets the callback function of the specified key combo
* to an empty function and deletes the corresponding key in the
* directMap dict.
*
* TODO: actually remove this from the callbacks dictionary instead
* of binding an empty function
*
* the keycombo+action has to be exactly the same as
* it was defined in the bind method
*
* @param {string|Array} keys
* @param {string} action
* @returns void
*/
module.exports = function (keys, action) {
var self = this
return self.bind(keys, function () {}, action)
}