GEN-LAST:event_textFieldKeyCodeFocusLost
767932
private void textFieldKeyCodeKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_textFieldKeyCodeKeyPressed
    if (this.buttonEditKeyCode.isSelected()){
      switch(evt.getKeyCode()){
        case KeyEvent.VK_META:
        case KeyEvent.VK_ALT:
        case KeyEvent.VK_SHIFT:
        case KeyEvent.VK_CONTROL: evt.consume();break;
        default:{
          updateCurrentSelectedForKey(evt);
          this.buttonEditKeyCode.setSelected(false);
          this.tableKeyShortcuts.requestFocus();
        }break;
      }
    }
    evt.consume();
  }
151515
private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
        // TODO add your handling code here:
        OkapiUI.compositeInputField.setText(compositeText.getText());
        dispose();
    }
84188
private void jCheckBoxUseDefaultActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxUseDefaultActionPerformed
        
    	if(jCheckBoxUseDefault.isSelected()){
    		pref.put(DisposableOBDAPreferences.USE_DEAFAULT, "true");
    		cmdFontFamily.setEnabled(false);
    	}else{
    		pref.put(DisposableOBDAPreferences.USE_DEAFAULT, "false");
    		cmdFontFamily.setEnabled(true);
    	}
    	
    }
782832
private void trackingStopMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_trackingStopMenuItemActionPerformed
        if (trackingWorker != null) {
            trackingWorker.cancel();
        } else {
            assert(false);
        }
    }
697073
function onKeyEventTargetKeyDown(e) {
      var macroModeState = vimGlobalState.macroModeState;
      var lastChange = macroModeState.lastInsertModeChanges;
      var keyName = CodeMirror.keyName(e);
      function onKeyFound() {
        lastChange.changes.push(new InsertModeKey(keyName));
        return true;
      }
      if (keyName.indexOf('Delete') != -1 || keyName.indexOf('Backspace') != -1) {
        CodeMirror.lookupKey(keyName, ['vim-insert'], onKeyFound);
      }
    }
1147737
function (bRestoreFocus, oEvent) {
			if (!this._bBlurOrKeyDownStarted) {
				this._bBlurOrKeyDownStarted = true;
				if (oEvent) {
					RenameHandler._preventDefault.call(this, oEvent);
					RenameHandler._stopPropagation.call(this, oEvent);
				}
				return this._emitLabelChangeEvent()
					.then(function (fnErrorHandler) {
						this.stopEdit(bRestoreFocus);
						if (typeof fnErrorHandler === "function") {
							fnErrorHandler(); // contains startEdit() and valueStateMessage
						}
					}.bind(this));
			}
			return Promise.resolve();
		}
963179
@UiHandler("m_textbox")
    void onTextboxFocus(FocusEvent event) {

        m_mainPanel.remove(m_fadePanel);
        setTitle("");
        CmsDomUtil.fireFocusEvent(this);
    }
498024
function (event) {
            var domUtil = ariaUtilsDom;

            var inputField = this.getTextInputField();
            var inputFieldValue = inputField.value;
            var inputFieldIsEmpty = (ariaUtilsString.trim(inputFieldValue) === "");

            switch (event.keyCode) {

                case event.KC_ARROW_LEFT :
                    if (this.hasInsertedOptions()) {

                        if (this.isInputFieldFocused()) {
                            var position = ariaUtilsCaret.getPosition(inputField);
                            if (position.start === 0 && position.end === 0) {
                                event.preventDefault();

                                // Close the dropdown in order not to mess with focus events and so on
                                this._closeDropdown();

                                // Highlight last option
                                this.highlightOption(this.insertedOptionsCount());
                                break;
                            }
                        }

                        if (this.isInHighlightedMode()) {
                            event.preventDefault();

                            this.__navigateLeftInHighlightedMode();
                            break;
                        }
                    }

                    break;

                case event.KC_ARROW_RIGHT :
                    if (this.isInHighlightedMode()) {
                        event.preventDefault();

                        this.__navigateRightInHighlightedMode();
                    }

                    break;

                case event.KC_TAB :
                    if (this.isInputFieldFocused()) {
                        if (inputFieldIsEmpty) {
                            if (inputField.nextSibling != null) {
                                event.preventDefault();

                                this._makeInputFieldLastChild();
                                this.setHelpText(false);
                                inputField.focus();
                            }
                        }
                    }

                    break;

                case event.KC_BACKSPACE :
                    if (inputFieldIsEmpty) {
                        var highlightedElementIndex = this.getHighlightedOptionIndex();
                        var highlightedElement = this.getHighlightedOption();

                        if (highlightedElement) {
                            var highlightedElementLabel = highlightedElement.textContent
                                    || highlightedElement.innerText;
                            domUtil.removeElement(highlightedElement);

                            var newIndex = highlightedElementIndex - 1;
                            if (newIndex >= 1) {
                                this.highlightOption(newIndex);
                            } else {
                                if (this.insertedOptionsCount() > 0) {
                                    this.highlightOption(1);
                                } else {
                                    this._enterInputField();
                                }
                            }

                            this._removeValue(highlightedElementLabel);
                        } else {
                            var previousSiblingElement = domUtil.getPreviousSiblingElement(inputField);
                            if (previousSiblingElement) {
                                var previousSiblingLabel = previousSiblingElement.firstChild.textContent
                                        || previousSiblingElement.firstChild.innerText;
                                domUtil.removeElement(previousSiblingElement);
                                this._removeValue(previousSiblingLabel);
                            }
                        }
                        event.preventDefault();
                    }

                    break;

                case event.KC_DELETE :
                    if (inputFieldIsEmpty) {
                        var highlightedElementIndex = this.getHighlightedOptionIndex();
                        var highlightedElement = this.getHighlightedOption();

                        if (highlightedElement) {
                            var highlightedElementLabel = highlightedElement.textContent
                                    || highlightedElement.innerText;
                            domUtil.removeElement(highlightedElement);

                            if (highlightedElementIndex <= this.insertedOptionsCount()) {
                                this.highlightOption(highlightedElementIndex);
                            } else {
                                this._enterInputField();
                            }

                            this._removeValue(highlightedElementLabel);
                        }
                    }

                    break;
            }

            if (this.isInputFieldFocused()) {
                this.$AutoComplete._dom_onkeydown.call(this, event);
            }
        }
1015230
function _handleKeyEvent(event) {
        var i, handled = false;
        for (i = _globalKeydownHooks.length - 1; i >= 0; i--) {
            if (_globalKeydownHooks[i](event)) {
                handled = true;
                break;
            }
        }
        _detectAltGrKeyDown(event);
        if (!handled && _handleKey(_translateKeyboardEvent(event))) {
            event.stopPropagation();
            event.preventDefault();
        }
    }
811724
private void txtQueryEditorKeyPressed(java.awt.event.KeyEvent evt) {// GEN-FIRST:event_txtQueryEditorKeyPressed
		// If users typed CTRL+E
		if ((evt.getKeyCode() == KeyEvent.VK_E) && ((evt.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
			executeQuery();
			txtClassUriTemplate.requestFocus();
		}
	}
494486
def keyPressEvent(self, event):
        
        if event.key() == QtCore.Qt.Key_F5 or \
           (event.key() == QtCore.Qt.Key_E and \
            event.modifiers() == QtCore.Qt.ControlModifier):
            code = str(self._edit.toPlainText())
            scope = self.viewWidget().codeScope()
            
            exec code in scope, scope
        else:
            super(XScriptView, self).keyPressEvent(event)
380140
def focusInEvent(self, event):
        
        if not self.signalsBlocked():
            self.focusChanged.emit(True)
            self.focusEntered.emit()
        
        return super(XTextEdit, self).focusInEvent(event)
919005
private void textFieldSearchTextKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_textFieldSearchTextKeyPressed
    switch (evt.getKeyCode()) {
      case KeyEvent.VK_ESCAPE: {
        this.setVisible(false);
        this.baseEditor.requestActive();
        evt.consume();
      }
      break;
      case KeyEvent.VK_ENTER: {
        if (evt.isShiftDown()) {
          findPrev();
        } else {
          findNext();
        }
        evt.consume();
      }
      break;
    }
  }
386672
@Override
	protected void keyTyped(char keyChar, int keyCode)
	{
		try
		{
			boolean ret = false;
			for (IKeyListener listener : keyListeners)
				ret |= listener.onKeyTyped(keyChar, keyCode);

			if (ret)
				return;

			if (focusedComponent != null && !keyListeners.contains(focusedComponent) && focusedComponent.onKeyTyped(keyChar, keyCode))
				return;

			if (hoveredComponent != null && !keyListeners.contains(hoveredComponent) && hoveredComponent.onKeyTyped(keyChar, keyCode))
				return;

			if (isGuiCloseKey(keyCode) && mc.currentScreen == this)
				close();

			if (!MalisisCore.isObfEnv && isCtrlKeyDown() && (current() != null || isOverlay))
			{
				if (keyCode == Keyboard.KEY_R)
				{
					clearScreen();
					setResolution();
					setHoveredComponent(null, true);
					setFocusedComponent(null, true);
					constructed = false;
					doConstruct();
				}
				if (keyCode == Keyboard.KEY_D)
				{
					debug = !debug;
					debugComponent.setEnabled(debug);
				}
				if (keyCode == Keyboard.KEY_P)
				{
					Position.CACHED = !Position.CACHED;
				}
				if (keyCode == Keyboard.KEY_S)
				{
					Size.CACHED = !Size.CACHED;
				}
			}
		}
		catch (Exception e)
		{
			MalisisCore.message("A problem occured while handling key typed for " + e.getClass().getSimpleName() + ": " + e.getMessage());
			e.printStackTrace(new PrintStream(new FileOutputStream(FileDescriptor.out)));
		}

	}
703986
@Override
    public boolean onKeyPreIme(int keyCode, KeyEvent event) {
        if (TextUtils.isEmpty(getText().toString())
                && keyCode == KeyEvent.KEYCODE_DEL)
            return true;
        else
            return super.onKeyPreIme(keyCode, event);
    }
1276740
def postprocess_keyevent(self, event):
        """"""
        event, text, key, ctrl, shift = restore_keyevent(event)
        
        # Is cursor on the last line? and after prompt?
        if len(text):
            #XXX: Shouldn't it be: `if len(unicode(text).strip(os.linesep))` ?
            if self.has_selected_text():
                self.check_selection()
            self.restrict_cursor_position(self.current_prompt_pos, 'eof')
            
        cursor_position = self.get_position('cursor')

        if key in (Qt.Key_Return, Qt.Key_Enter):
            if self.is_cursor_on_last_line():
                self._key_enter()
            # add and run selection
            else:
                self.insert_text(self.get_selected_text(), at_end=True)
            
        elif key == Qt.Key_Insert and not shift and not ctrl:
            self.setOverwriteMode(not self.overwriteMode())
            
        elif key == Qt.Key_Delete:
            if self.has_selected_text():
                self.check_selection()
                self.remove_selected_text()
            elif self.is_cursor_on_last_line():
                self.stdkey_clear()
            
        elif key == Qt.Key_Backspace:
            self._key_backspace(cursor_position)
            
        elif key == Qt.Key_Tab:
            self._key_tab()
            
        elif key == Qt.Key_Space and ctrl:
            self._key_ctrl_space()

        elif key == Qt.Key_Left:
            if self.current_prompt_pos == cursor_position:
                # Avoid moving cursor on prompt
                return
            method = self.extend_selection_to_next if shift \
                     else self.move_cursor_to_next
            method('word' if ctrl else 'character', direction='left')
                
        elif key == Qt.Key_Right:
            if self.is_cursor_at_end():
                return
            method = self.extend_selection_to_next if shift \
                     else self.move_cursor_to_next
            method('word' if ctrl else 'character', direction='right')

        elif (key == Qt.Key_Home) or ((key == Qt.Key_Up) and ctrl):
            self._key_home(shift, ctrl)

        elif (key == Qt.Key_End) or ((key == Qt.Key_Down) and ctrl):
            self._key_end(shift, ctrl)

        elif key == Qt.Key_Up:
            if not self.is_cursor_on_last_line():
                self.set_cursor_position('eof')
            y_cursor = self.get_coordinates(cursor_position)[1]
            y_prompt = self.get_coordinates(self.current_prompt_pos)[1]
            if y_cursor > y_prompt:
                self.stdkey_up(shift)
            else:
                self.browse_history(backward=True)
                
        elif key == Qt.Key_Down:
            if not self.is_cursor_on_last_line():
                self.set_cursor_position('eof')
            y_cursor = self.get_coordinates(cursor_position)[1]
            y_end = self.get_coordinates('eol')[1]
            if y_cursor < y_end:
                self.stdkey_down(shift)
            else:
                self.browse_history(backward=False)
            
        elif key in (Qt.Key_PageUp, Qt.Key_PageDown):
            #XXX: Find a way to do this programmatically instead of calling
            # widget keyhandler (this won't work if the *event* is coming from
            # the event queue - i.e. if the busy buffer is ever implemented)
            ConsoleBaseWidget.keyPressEvent(self, event)

        elif key == Qt.Key_Escape and shift:
            self.clear_line()

        elif key == Qt.Key_Escape:
            self._key_escape()
                
        elif key == Qt.Key_L and ctrl:
            self.clear_terminal()
            
        elif key == Qt.Key_V and ctrl:
            self.paste()
            
        elif key == Qt.Key_X and ctrl:
            self.cut()
            
        elif key == Qt.Key_Z and ctrl:
            self.undo()
            
        elif key == Qt.Key_Y and ctrl:
            self.redo()
            
        elif key == Qt.Key_A and ctrl:
            self.selectAll()
                
        elif key == Qt.Key_Question and not self.has_selected_text():
            self._key_question(text)
            
        elif key == Qt.Key_ParenLeft and not self.has_selected_text():
            self._key_parenleft(text)
            
        elif key == Qt.Key_Period and not self.has_selected_text():
            self._key_period(text)

        elif len(text) and not self.isReadOnly():
            self.hist_wholeline = False
            self.insert_text(text)
            self._key_other(text)
                
        else:
            # Let the parent widget handle the key press event
            ConsoleBaseWidget.keyPressEvent(self, event)
238525
private void tfClassNameFocusLost(java.awt.event.FocusEvent evt)//GEN-FIRST:event_tfClassNameFocusLost
    {//GEN-HEADEREND:event_tfClassNameFocusLost
        // Commit on lost focus
        aTable.setClassName(tfClassName.getText());
    }