Code example for KeyboardView

Methods: handleBack

                // The InputMethodService already takes care of the back 
                // key for us, to dismiss the input method if it is shown. 
                // However, our keyboard could be showing a pop-up window 
                // that back should dismiss, so we first allow it to do that. 
                if (event.getRepeatCount() == 0 && mInputView != null) {
                    if (mInputView.handleBack())
                        return true; 
            case KeyEvent.KEYCODE_DEL:
                // Special handling of the delete key: if we currently are 
                // composing text for the user, we want to modify that instead 
                // of letting the application to the delete itself. 
                    onKey(Keyboard.KEYCODE_DELETE, null);
                    return true; 
Connect your IDE to all the code out there  Get Codota for Java