utils/keybinding.js
function removeMethod (char, method) {
  if (!hasKeybinding(char, method)) return;
  var fnIndex = bindings[char].methods.indexOf(method);
  window.removeEventListener('keyup', bindings[char].listeners[fnIndex]);
  bindings[char].methods.splice(fnIndex, 1);
  bindings[char].listeners.splice(fnIndex, 1);

  if (!bindings[char].methods.length) {
    delete bindings[char];
  } else if (fnIndex === 0) {
    window.addEventListener('keyup', bindings[char].listeners[0]);
  }
}
function removeMethod (char, method) {
  if (!hasKeybinding(char, method)) return;
  var fnIndex = bindings[char].methods.indexOf(method);
  window.removeEventListener('keyup', bindings[char].listeners[fnIndex]);
  bindings[char].methods.splice(fnIndex, 1);
  bindings[char].listeners.splice(fnIndex, 1);

  if (!bindings[char].methods.length) {
    delete bindings[char];
  } else if (fnIndex === 0) {
    window.addEventListener('keyup', bindings[char].listeners[0]);
  }
}
function removeMethod ( char , method ) { if ( ! hasKeybinding ( char , method ) ) return ; var fnIndex = bindings [ char ] . methods . indexOf ( method ) ; window . removeEventListener ( 'keyup' , bindings [ char ] . listeners [ fnIndex ] ) ; bindings [ char ] . methods . splice ( fnIndex , 1 ) ; bindings [ char ] . listeners . splice ( fnIndex , 1 ) ; if ( ! bindings [ char ] . methods . length ) { delete bindings [ char ] ; } else if ( fnIndex === 0 ) { window . addEventListener ( 'keyup' , bindings [ char ] . listeners [ 0 ] ) ; } }
- Removes the event from window and the methods from bindings - @arg {String} char     - the character key to be removed - @arg {Function} method - the callback handler to remove
- Removes the event from window and the methods from bindings -