client/plugins/keyboard/js/mousetrap.js
function _handleKeyEvent(e) {

            // normalize e.which for key events
            // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion
            if (typeof e.which !== 'number') {
                e.which = e.keyCode;
            }

            var character = _characterFromEvent(e);

            // no character found then stop
            if (!character) {
                return;
            }

            // need to use === for the character check because the character can be 0
            if (e.type == 'keyup' && _ignoreNextKeyup === character) {
                _ignoreNextKeyup = false;
                return;
            }

            self.handleKey(character, _eventModifiers(e), e);
        }
function _handleKeyEvent(e) {

            // normalize e.which for key events
            // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion
            if (typeof e.which !== 'number') {
                e.which = e.keyCode;
            }

            var character = _characterFromEvent(e);

            // no character found then stop
            if (!character) {
                return;
            }

            // need to use === for the character check because the character can be 0
            if (e.type == 'keyup' && _ignoreNextKeyup === character) {
                _ignoreNextKeyup = false;
                return;
            }

            self.handleKey(character, _eventModifiers(e), e);
        }
function _handleKeyEvent ( e ) { // normalize e.which for key events // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion if ( typeof e . which !== 'number' ) { e . which = e . keyCode ; } var character = _characterFromEvent ( e ) ; // no character found then stop if ( ! character ) { return ; } // need to use === for the character check because the character can be 0 if ( e . type == 'keyup' && _ignoreNextKeyup === character ) { _ignoreNextKeyup = false ; return ; } self . handleKey ( character , _eventModifiers ( e ) , e ) ; }
handles a keydown event

@param {Event} e
@returns void
handles a keydown event