Show the pop-up keyboard

@param context Activity/Context.
@param field   field that requests focus.
513149
public static void showKeyboard(Context context, View field){
        try {
            field.requestFocus();
            InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
            imm.showSoftInput(field, InputMethodManager.SHOW_IMPLICIT);
        } catch (Exception ex) {
            Log.e("Caffeine", "Error occurred trying to show the keyboard.  Exception=" + ex);
        }
    }
106731
public static void setText(Activity context, int field, String text) {
        View view = context.findViewById(field);
        if (view instanceof TextView) {
            ((TextView) view).setText(text);
        } else {
            Log.e("Caffeine", "ViewUtils.setText() given a field that is not a TextView");
        }
    }
40607
protected void onTimeKeyPressed(KeyUpEvent event) {

        switch (event.getNativeEvent().getKeyCode()) {
            case KeyCodes.KEY_CTRL:
            case KeyCodes.KEY_SHIFT:
            case KeyCodes.KEY_ALT:
            case KeyCodes.KEY_LEFT:
            case KeyCodes.KEY_RIGHT:
                break;
            case KeyCodes.KEY_ENTER:
                updateFromPicker();
                hidePopup();
                break;
            default:
                Scheduler.get().scheduleDeferred(new ScheduledCommand() {

                    public void execute() {

                        executeTimeAction();
                        fireChange(getValue(), false);
                    }
                });
                break;
        }
    }
596849
public static InputDialog showInputDialog (Stage stage, String title, String fieldTitle, InputDialogListener listener) {
		InputDialog dialog = new InputDialog(title, fieldTitle, true, null, listener);
		stage.addActor(dialog.fadeIn());
		return dialog;
	}
932813
public void onBrowserEvent(Context context, Element elem, final T object, NativeEvent event) {
        final int index = context.getIndex();
        ValueUpdater<C> valueUpdater = (fieldUpdater == null) ? null : (ValueUpdater<C>) value -> {
            fieldUpdater.update(index, object, value);
        };
        cell.onBrowserEvent(context, elem, getValue(object), event, valueUpdater);
    }
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;
                }
            });
        }
    }
982948
public static void showSoftKeyboard(Context context, View view) {
		InputMethodManager imm = (InputMethodManager) context
				.getSystemService(Context.INPUT_METHOD_SERVICE);
		imm.showSoftInput(view, InputMethodManager.SHOW_FORCED);
	}
182911
private void showPopup(MouseEvent evt) {
		if (evt.isPopupTrigger()) {
			popMenu.show(evt.getComponent(), evt.getX(), evt.getY());
		}
	}
382890
public void setOnKeyboardDone(final IntlPhoneInputListener listener) {
        mPhoneEdit.setOnEditorActionListener(new TextView.OnEditorActionListener() {
            @Override
            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
                if (actionId == EditorInfo.IME_ACTION_DONE) {
                    listener.done(IntlPhoneInput.this, isValid());
                }
                return false;
            }
        });
    }
867424
public void focusGained(FocusEvent e)
    {
        if (m_componentNextFocus != null)
        {
            m_componentNextFocus.requestFocus();
            return;
        }
        Component component = (Component)e.getSource();
        String string = component.getName();
        if (this.getFieldList() != null)
        {
            FieldInfo field = this.getFieldList().getField(string);        // Get the fieldInfo for this component
            if (field != null)
                this.getBaseApplet().setStatusText(field.getFieldTip(), Constants.INFORMATION);
        }
        String strLastError = BaseApplet.getSharedInstance().getLastError(0);
        if ((strLastError != null) && (strLastError.length() > 0))
            this.getBaseApplet().setStatusText(strLastError, Constants.WARNING);
    }
730003
private void processField(Field field) {
    OptionArgument optAnnotation = field.getAnnotation(OptionArgument.class);
    if (optAnnotation != null) {
      processOptionField(field, optAnnotation.value(), optAnnotation.shortKey());
    } else {
      CommandArgument cmdAnnotation = field.getAnnotation(CommandArgument.class);
      if (cmdAnnotation != null) {
        processCommandField(field, cmdAnnotation.value(), null);
      } else {
        ShellArgument shellAnnotation = field.getAnnotation(ShellArgument.class);
        if (shellAnnotation != null) {
          processCommandField(field, shellAnnotation.value(), shellAnnotation.prompt());
        }
      }
    }
  }
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;
    }
  }
88445
@Override public void onFocusChange(View v, boolean hasFocus) {

        final EmailAutoCompleteTextView editText = (EmailAutoCompleteTextView) v;
        if (mClearButtonEnabled) {
            editText.setClearVisible((hasFocus && !TextUtils.isEmpty(editText.getText().toString())));
        }

        if (mOnFocusChangeListener != null) {
            mOnFocusChangeListener.onFocusChange(v, hasFocus);
        }
    }
824492
public void setOnfocus(java.lang.String onfocus) {
        getStateHelper().put(PropertyKeys.onfocus, onfocus);
        handleAttribute("onfocus", onfocus);
    }
897440
function(context) {
		this._keymap = Object.create(null);
		["keydown", "keypress", "keyup"].forEach(function(type) {
			context.document.addEventListener(type, this, false);
		}, this);
	}
642318
protected void showPopupMenu(MouseEvent e) {
        if (onAboutToShow(e)) {
            JPopupMenu popupToShow = getPopupMenu(e);
            if (popupToShow == null) {
                return;
            }
            popupToShow.show(e.getComponent(), e.getX(), e.getY());
            popupToShow.setVisible(true);
        }
    }
366518
function (event) {
                    this._lastKeyOrBlurEvent = this._currentKeyOrBlurEvent;
                    switch (event.type) {
                        case "keyup":
                            if (event.keyCode === Key.shift) {
                                this._currentKeyOrBlurEvent = null;
                            } else {
                                this._currentKeyOrBlurEvent = "keyboard";
                            }
                            break;
                        case "focusout":
                            //anchor element no longer in focus, clear up the stack
                            this._currentKeyOrBlurEvent = null;
                            break;
                        default:
                            break;

                    }
                }