client/plugins/keyboard/js/mousetrap.js
function _pickBestAction(key, modifiers, action) {

        // if no action was picked in we should try to pick the one
        // that we think would work best for this key
        if (!action) {
            action = _getReverseMap()[key] ? 'keydown' : 'keypress';
        }

        // modifier keys don't work as expected with keypress,
        // switch to keydown
        if (action == 'keypress' && modifiers.length) {
            action = 'keydown';
        }

        return action;
    }
function _pickBestAction(key, modifiers, action) {

        // if no action was picked in we should try to pick the one
        // that we think would work best for this key
        if (!action) {
            action = _getReverseMap()[key] ? 'keydown' : 'keypress';
        }

        // modifier keys don't work as expected with keypress,
        // switch to keydown
        if (action == 'keypress' && modifiers.length) {
            action = 'keydown';
        }

        return action;
    }
function _pickBestAction ( key , modifiers , action ) { // if no action was picked in we should try to pick the one // that we think would work best for this key if ( ! action ) { action = _getReverseMap ( ) [ key ] ? 'keydown' : 'keypress' ; } // modifier keys don't work as expected with keypress, // switch to keydown if ( action == 'keypress' && modifiers . length ) { action = 'keydown' ; } return action ; }
picks the best action based on the key combination

@param {string} key - character for key
@param {Array} modifiers
@param {string=} action passed in
picks the best action based on the key combination