diff --git a/plugins/global-bind/mousetrap-global-bind.js b/plugins/global-bind/mousetrap-global-bind.js index 1c4ac148..b3a8e123 100644 --- a/plugins/global-bind/mousetrap-global-bind.js +++ b/plugins/global-bind/mousetrap-global-bind.js @@ -38,6 +38,20 @@ _globalCallbacks[keys] = true; }; + + Mousetrap.prototype.unbindGlobal = function(keys, action) { + var self = this; + self.unbind(keys, action); + + if (keys instanceof Array) { + for (var i = 0; i < keys.length; i++) { + _globalCallbacks[keys[i]] = false; + } + return; + } + + _globalCallbacks[keys] = false; + }; Mousetrap.init(); }) (Mousetrap);