handles a keydown event

@param {Event} e
@returns void
770741
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);
        }
713985
function keyPressed(e){
            if (e.code === "Escape") {
                if (this.parent !== null) {
                    var p = this.$parentMenu;
                    this.$canceled(this);
                    this.$hideMenu();
                    if (p !== null) {
                        p.requestFocus();
                    }
                }
            } else {
                this.$super(e);
            }
        }
988855
function onKeyDown(e, that) {
        //On enter send command
        if (e.keyCode === 13) {
            //Remove all may existing suggestions
            that.$debuggerInput.find('.suggestion').remove();
            var com = that.$debuggerInput.val();

            if (com.length > 0) {
                history.push(com);
                historyCurrent = history.length;
                that.log($('<span>').text('>> ' + com));
                that._nodeDebuggerDomain.exec('eval', com);
                //reset the input field
                that.$debuggerInput.val('');
            }
        }
        //On key up/down scroll through history
        if (e.keyCode === 40) {
            historyCurrent++;
            if (history[historyCurrent]) {
                that.$debuggerInput.val(history[historyCurrent]);
            }
            else {
                historyCurrent = history.length;
                that.$debuggerInput.val('');
            }
            //e.preventDefault();
        }
        if (e.keyCode === 38) {
            historyCurrent--;
            if (history[historyCurrent]) {
                that.$debuggerInput.val(history[historyCurrent]);
            }
            else {
                historyCurrent = 0;
            }
            e.preventDefault();
        }
    }
853178
function onPointerEvent(e) {
       var ret = true; // normalize eventTypes

       normalizeEvent(e); // remember/use the first "primary" normalized event for pointer.bind

       var button = normalizedEvents[0].button; // dispatch event to registered objects

       if (dispatchEvent(normalizedEvents) || api.preventDefault) {
         // prevent default action
         ret = api._preventDefaultFn(e);
       }

       var keycode = api.pointer.bind[button]; // check if mapped to a key

       if (keycode) {
         if (POINTER_DOWN.includes(e.type)) {
           return api._keydown(e, keycode, button + 1);
         } else {
           // 'mouseup' or 'touchend'
           return api._keyup(e, keycode, button + 1);
         }
       }

       return ret;
     }
476176
function(e) {
    var target = e.target || e.srcElement;
    if (e.keyCode === 8) {
      if (target.getAttribute('contenteditable') ||
          target.tagName === 'INPUT' ||
          target.tagName === 'TEXTAREA') {
        return;
      }

      e.preventDefault();
    }
  }
850112
function (e) {
                var keyCode = e.domEvent.keyCode;
                if (keyCode === 38 || keyCode === 40 || keyCode === 37 || keyCode === 39) {
                    var index = this.$currentSelectionIndex !== null ? this.$currentSelectionIndex : -1;
                    var indexOffset;
                    if (this.$.scrollDirection === SCROLL_DIRECTION_VERTICAL) {
                        indexOffset = this.$._cols;
                    } else {
                        indexOffset = this.$._rows;
                    }
                    switch (keyCode) {
                        case 38:
                            index -= this.$._cols;
                            break;
                        case 40:
                            index += this.$._cols;
                            break;
                        case 37:
                            index--;
                            break;
                        case 39:
                            index++;
                            break;
                        default:
                            void 0;
                    }
                    if (index < 0) {
                        index = 0;
                    }
                    if (this.$.$dataAdapter && index >= this.$.$dataAdapter.size()) {
                        index = this.$.$dataAdapter.size() - 1;
                    }
                    this._selectItem(index, e.domEvent.shiftKey, false);
                    e.preventDefault();
                    e.stopPropagation();
                }
            }
550090
function shortcutHandler(e) {
      if (e.keyCode == self.settings.shortcut.modifier) { isMod = true } // check for modifier press(default is alt key), save to var
      if (e.keyCode == 17) { isCtrl = true } // check for ctrl/cmnd press, in order to catch ctrl/cmnd + s
      if (e.keyCode == 18) { isCtrl = false }

      // Check for alt+p and make sure were not in fullscreen - default shortcut to switch to preview
      if (isMod === true && e.keyCode == self.settings.shortcut.preview && !self.is('fullscreen')) {
        e.preventDefault();
        if (self.is('edit') && self._previewEnabled) {
          self.preview();
        }
        else if (self._editEnabled) {
          self.edit();
        }
      }
      // Check for alt+f - default shortcut to make editor fullscreen
      if (isMod === true && e.keyCode == self.settings.shortcut.fullscreen && self._fullscreenEnabled) {
        e.preventDefault();
        self._goFullscreen(fsElement);
      }

      // Set the modifier key to false once *any* key combo is completed
      // or else, on Windows, hitting the alt key will lock the isMod state to true (ticket #133)
      if (isMod === true && e.keyCode !== self.settings.shortcut.modifier) {
        isMod = false;
      }

      // When a user presses "esc", revert everything!
      if (e.keyCode == 27 && self.is('fullscreen')) {
        self._exitFullscreen(fsElement);
      }

      // Check for ctrl + s (since a lot of people do it out of habit) and make it do nothing
      if (isCtrl === true && e.keyCode == 83) {
        self.save();
        e.preventDefault();
        isCtrl = false;
      }

      // Do the same for Mac now (metaKey == cmd).
      if (e.metaKey && e.keyCode == 83) {
        self.save();
        e.preventDefault();
      }

    }
1049406
function onKeydown(event)
{
  // Gets the keycode, then stores it
  var keyCode = event.which;

  // Checks which action matches with the current keycode
  switch (keyCode)
  {
    case 65: keyA();
    break;

    case 66: keyB();
    break;

    case 67: keyC();
    break;

    case 68: keyD();
    break;

    case 69: keyE();
    break;

    case 70: keyF();
    break;

    case 71: keyG();
    break;

    case 72: keyH();
    break;

    case 73: keyI();
    break;

    case 74: keyJ();
    break;

    case 75: keyK();
    break;

    case 76: keyL();
    break;

    case 77: keyM();
    break;

    case 78: keyN();
    break;

    case 79: keyO();
    break;

    case 80: keyP();
    break;

    case 81: keyQ();
    break;

    case 82: keyR();
    break;

    case 83: keyS();
    break;

    case 84: keyT();
    break;

    case 85: keyU();
    break;

    case 86: keyV();
    break;

    case 87: keyW();
    break;

    case 88: keyX();
    break;

    case 89: keyY();
    break;

    case 90: keyZ();
    break;

    case 96: key0();
    break;

    case 97: key1();
    break;

    case 98: key2();
    break;

    case 99: key3();
    break;

    case 100: key4();
    break;

    case 101: key5();
    break;

    case 102: key6();
    break;

    case 103: key7();
    break;

    case 104: key8();
    break;

    case 105: key9();
    break;

    // Gets the jim help element to toggle the none class
    default:
    document.getElementById('jim-help').classList.toggle('none');
  }
}
400779
function(e) {
        if (this.enableKeys) {
            var kc = Event.getCharCode(e);

            switch (kc) {
                case 0x25: // left
                case 0x26: // up
                case 0x27: // right
                case 0x28: // down
                case 0x24: // home
                case 0x23: // end
                    Event.preventDefault(e);
                    break;
                default:
            }
        }
    }
786715
function(e) {
        var KEYS = YAHOO.util.KeyListener.KEY;

        if (YAHOO.util.Event.getCharCode(e) == KEYS.ENTER) {
            YAHOO.util.Event.preventDefault(e);
            this.submit();
        }
    }
530057
function() {
				// Remove keydown event listeners
				this.handle1.removeEventListener("keydown", this.handle1Keydown, false);
				this.handle2.removeEventListener("keydown", this.handle2Keydown, false);

				if (this.showTooltip) {
					this.handle1.removeEventListener("focus", this.showTooltip, false);
					this.handle2.removeEventListener("focus", this.showTooltip, false);
				}
				if (this.hideTooltip) {
					this.handle1.removeEventListener("blur", this.hideTooltip, false);
					this.handle2.removeEventListener("blur", this.hideTooltip, false);
				}

				// Remove event listeners from sliderElem
				if (this.showTooltip) {
					this.sliderElem.removeEventListener("mouseenter", this.showTooltip, false);
				}
				if (this.hideTooltip) {
					this.sliderElem.removeEventListener("mouseleave", this.hideTooltip, false);
				}
				this.sliderElem.removeEventListener("touchstart", this.mousedown, false);
				this.sliderElem.removeEventListener("mousedown", this.mousedown, false);
			}
1274459
function _characterFromEvent(e) {

        // for keypress events we should return the character as is
        if (e.type == 'keypress') {
            var character = String.fromCharCode(e.which);

            // if the shift key is not pressed then it is safe to assume
            // that we want the character to be lowercase.  this means if
            // you accidentally have caps lock on then your key bindings
            // will continue to work
            //
            // the only side effect that might not be desired is if you
            // bind something like 'A' cause you want to trigger an
            // event when capital A is pressed caps lock will no longer
            // trigger the event.  shift+a will though.
            if (!e.shiftKey) {
                character = character.toLowerCase();
            }

            return character;
        }

        // for non keypress events the special maps are needed
        if (_MAP[e.which]) {
            return _MAP[e.which];
        }

        if (_KEYCODE_MAP[e.which]) {
            return _KEYCODE_MAP[e.which];
        }

        // if it is not in the special map

        // with keydown and keyup events the character seems to always
        // come in as an uppercase character whether you are pressing shift
        // or not.  we should make sure it is always lowercase for comparisons
        return String.fromCharCode(e.which).toLowerCase();
    }
1134899
function onKeyDown( evt ) {
    switch ( evt.key ) {
    case 'Space':
        this.expanded = !this.expanded;
        evt.preventDefault();
        break;
    case 'Enter':
        this.action = this.value;
        break;
    case 'ArrowDown':
        selectNext.call( this );
        evt.preventDefault();
        break;
    case 'ArrowUp':
        selectPrev.call( this );
        evt.preventDefault();
        break;
    case 'Escape':
        if ( this.expanded ) {
            this.expanded = false;
            // Set the value as it was when we expanded the combo.
            this.value = this._valueWhenExpanded;
            evt.preventDefault();
        }
        break;
    default:
        // Do nothing.
    }
}
1104758
function(e) {

                    if (!self.originalElem.disabled) {
                        // Sets the current key to the `keyCode` value if `charCode` does not exist.  Used for cross
                        // browser support since IE uses `keyCode` instead of `charCode`.
                        var currentKey = e.charCode || e.keyCode,

                            key = self._keyMappings[e.charCode || e.keyCode],

                            // Converts unicode values to characters
                            alphaNumericKey = String.fromCharCode(currentKey);

                        // If the plugin options allow text searches
                        if (self.search && (!key || (key && key === "space"))) {

                            // Calls `search` and passes the character value of the user's text search
                            self.search(alphaNumericKey, true, true);

                        }

                        if(key === "space") {

                            e.preventDefault();

                        }
                    }
                }
1300693
public void keyReleased(KeyEvent e) {
        char ch = e.getKeyChar();
        if (ch == KeyEvent.CHAR_UNDEFINED || Character.isISOControl(ch))
            return;
        int pos = editor.getCaretPosition();
        String str = editor.getText();
        if (str.length() == 0)
            return;

        boolean matchFound = false;
        for (int k = 0; k < comboBox.getItemCount(); k++) {
            String item = comboBox.getItemAt(k).toString();
            if (startsWithIgnoreCase(item, str)) {
                comboBox.setSelectedIndex(k);
                editor.setText(item);
                editor.setCaretPosition(item.length());
                editor.moveCaretPosition(pos);

                // show popup when the user types
                if (comboBox.isDisplayable())
                    comboBox.setPopupVisible(true);

                matchFound = true;
                break;
            }
        }
        if (!matchFound) {
            // hide popup when there is no match
            comboBox.setPopupVisible(false);
        }
    }
148756
function keydown(event) {
			var inc = 0;
			if (ctrl.horizontal) {
				if (event.which === 37) { // LEFT
					inc = -1;
				} else if (event.which === 39) { // RIGHT
					inc = 1;
				}
			} else {
				var innerLimit = ctrl.getInnerLimit();
				if (event.which === 38) { // UP
					inc = -1;
				} else if (event.which === 40) { // DOWN
					inc = 1;
				} else if (event.which === 33) { // PAGEUP
					inc = -innerLimit;
				} else if (event.which === 34) { // PAGEDOWN
					inc = innerLimit;
				} else if (event.which === 35) { // END
					inc = $scope.total - $scope.ngBegin - innerLimit;
				} else if (event.which === 36) { // HOME
					inc = -$scope.ngBegin;
				}
			}
			if (inc !== 0) {
				boxesScrollServices.stopEvent(event);
				$scope.ngBegin = $scope.ngBegin + inc;
			}
		}
1264728
function (e) {
            if (e.keyCode === KeyEvent.DOM_VK_ESCAPE) {
                this.props.actions.cancelRename();
            } else if (e.keyCode === KeyEvent.DOM_VK_RETURN) {
                this.props.actions.performRename();
            }
        }