The default keypress event handling function for form fields.<p>

@param field the form field for which the event has been fired

@param keyCode the key code
499387
protected void defaultHandleKeyPress(I_CmsFormField field, int keyCode) {

        I_CmsFormWidget widget = field.getWidget();
        if (keyCode == KeyCodes.KEY_ENTER) {
            m_pressedEnter = true;
            if (widget instanceof I_CmsHasBlur) {
                // force a blur because not all browsers send a change event if the user just presses enter in a field
                ((I_CmsHasBlur)widget).blur();
            }
            // make sure that the flag is set to false again after the other events have been processed
            Scheduler.get().scheduleDeferred(new ScheduledCommand() {

                /**
                 * @see com.google.gwt.core.client.Scheduler.ScheduledCommand#execute()
                 */
                public void execute() {

                    m_pressedEnter = false;
                }
            });
        }
    }
539620
public void codeSent(String emailOrNumber) {
        Log.d(TAG, "Now showing the Code Input Form");
        if (passwordlessRequestCodeLayout != null) {
            removeView(passwordlessRequestCodeLayout);
            if (socialLayout != null) {
                socialLayout.setVisibility(GONE);
            }
            if (orSeparatorMessage != null) {
                orSeparatorMessage.setVisibility(GONE);
            }
        }
        addPasswordlessInputCodeLayout(emailOrNumber);
        lockWidget.updateHeaderTitle(R.string.com_auth0_lock_title_passwordless);
    }
2001
@Override
    public void keyPressed(KeyEvent e) {
        switch (e.getKeyCode()) {
        case KeyEvent.VK_BACK_SPACE:
        case KeyEvent.VK_ENTER:
        case KeyEvent.VK_DELETE:
        case KeyEvent.VK_TAB:
            e.consume();
            break;
        }
    }
944795
public void keyReleased(KeyEvent event)
    {
        lastKeyName = EMPTY_KEY_NAME;
        lastCode = NO_KEY_CODE;

        final Integer key = Integer.valueOf(event.getCode());
        keys.remove(key);
        pressed.remove(key);
    }
1345369
protected void keyEvent(final KeyEvent event) {
		try {
			if (event.getID() == KeyEvent.KEY_PRESSED && event.getKeyCode() == KeyEvent.VK_ENTER
					&& isEditable()) {
				// voir aussi focusEvent
				setValue(getValue());
			}
		} catch (final Exception e) {
			beep();
		}
	}
997619
public static void doAction(JTextField textField){
        String command = null;
        if(textField.getAction()!=null)
            command = (String)textField.getAction().getValue(Action.ACTION_COMMAND_KEY);
        ActionEvent event = null;
        
        for(ActionListener listener: textField.getActionListeners()){
            if(event==null)
                event = new ActionEvent(textField, ActionEvent.ACTION_PERFORMED, command, System.currentTimeMillis(), 0);
            listener.actionPerformed(event);
        }
    }
770718
protected void prepareKeyEvents(StringBuffer handlers) {
		prepareAttribute(handlers, "onkeydown", getAttribute("onkeydown"));
		prepareAttribute(handlers, "onkeyup", getAttribute("onkeyup"));
		prepareAttribute(handlers, "onkeypress", getAttribute("onkeypress"));
	}
409366
@UiHandler("m_searchInput")
    protected void onSearchInputKeyPress(KeyPressEvent event) {

        if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
            Scheduler.get().scheduleDeferred(new ScheduledCommand() {

                public void execute() {

                    m_tabHandler.selectResultTab();
                }
            });
        } else {

            Scheduler.get().scheduleDeferred(new ScheduledCommand() {

                /**
                 * @see com.google.gwt.user.client.Command#execute()
                 */
                public void execute() {

                    ValueChangeEvent.fire(m_searchInput, m_searchInput.getText());
                }
            });
        }
    }
641378
public void keyPressed(KeyEvent k) {

        //  System.out.println("Key pressed: " + k.getKeyCode());
        if (k.getKeyCode() == KeyEvent.VK_ENTER) {
            finishCreate();
        } else if (k.getKeyCode() == KeyEvent.VK_ESCAPE) {
            dispose();
        }
    }
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);
    }
275686
@Override
    public boolean onKeyUp (int keyCode, KeyEvent event){

        MapView mMapView = getMapView();
        if (mMapView==null)
            return super.onKeyUp(keyCode,event);
        switch (keyCode) {
            case KeyEvent.KEYCODE_PAGE_DOWN:
                mMapView.getController().zoomIn();
                return true;
            case KeyEvent.KEYCODE_PAGE_UP:
                mMapView.getController().zoomOut();
                return true;
        }
        return super.onKeyUp(keyCode,event);
    }
237511
@Override
    public void onKeyDown(KeyDownEvent event) {
	char c = MiscUtils.getCharCode(event.getNativeEvent());
	onKeyCodeEvent(event, box.getValue()+c);
    }
372106
function handleKeydown(keyCodes, e, callback) {
    const keyCode = e.charCode || e.keyCode;
    if (keyCodes.indexOf(keyCode) !== -1) {
        callback();
    }
}
38714
public void setKey(String field, byte[] key) throws IOException {
        int hash = Arrays.hashCode(field.getBytes());
        setKey(structure.keyHash2Index.get(hash), key);
    }
802156
function (event) {
            if (this._subTplModuleCtrl) {
                if (!event.isSpecialKey && event.charCode != event.KC_SPACE) {
                    this.sendKey(event);
                }
            }
        }
1049468
public static void keyPressString(String str) {
		ClipboardUtil.setStr(str);
		keyPressWithCtrl(KeyEvent.VK_V);// 粘贴
		delay();
	}
743340
public void keyPressed(KeyEvent evt)
    {
        if (evt.getKeyCode() == KeyEvent.VK_ENTER)
        {
            boolean bDoTab = true;
            int iTextLength = m_control.getDocument().getLength();
            if (((m_control.getSelectionStart() == 0) || (m_control.getSelectionStart() == iTextLength))
                    && ((m_control.getSelectionEnd() == 0) || (m_control.getSelectionEnd() == iTextLength)))
                bDoTab = true;
            else
                bDoTab = false;     // Not fully selected, definitely process this key
            if (bDoTab)
            {
                if (m_bDirty)
                    bDoTab = false;     // Data changed, definetly process this key
            }

            if (evt.getKeyCode() == KeyEvent.VK_ENTER)
                if (!bDoTab)
                    return;     // Do not consume... process the return in the control
            evt.consume();  // Don't process the tab as an input character... tab to the next/prev field.
            this.transferFocus(); // Move focus to next component
            return;
        }
        m_bDirty = true;
    }