code: function dispatch(event, scope){
      var key, handler, k, i, modifiersMatch;
      key = event.keyCode;
  
      // if a modifier key, set the key.<modifierkeyname> property to true and return
      if(key == 93 || key == 224) key = 91; // right command on webkit, command on Gecko
      if(key in _mods) {
        _mods[key] = true;
        // 'assignKey' from inside this closure is exported to window.key
        for(k in _MODIFIERS) if(_MODIFIERS[k] == key) assignKey[k] = true;
        return;
      }
  
      // see if we need to ignore the keypress (ftiler() can can be overridden)
      // by default ignore key presses if a select, textarea, or input is focused
      if(!assignKey.filter.call(this, event)) return;
  
      // abort if no potentially matching shortcuts found
      if (!(key in _handlers)) return;
  
      // for each potential shortcut
      for (i = 0; i < _handlers[key].length; i++) {
        handler = _handlers[key][i];
  
        // see if it's in the current scope
        if(handler.scope == scope || handler.scope == 'all'){
          // check if modifiers match if any
          modifiersMatch = handler.mods.length > 0;
          for(k in _mods)
            if((!_mods[k] && index(handler.mods, +k) > -1) ||
              (_mods[k] && index(handler.mods, +k) == -1)) modifiersMatch = false;
          // call the handler and stop the event if neccessary
          if((handler.mods.length == 0 && !_mods[16] && !_mods[18] && !_mods[17] && !_mods[91]) || modifiersMatch){
            if(handler.method(event, handler)===false){
              if(event.preventDefault) event.preventDefault();
                else event.returnValue = false;
              if(event.stopPropagation) event.stopPropagation();
              if(event.cancelBubble) event.cancelBubble = true;
            }
          }
        }
  	}
    }
docs: handle keydown event