Code example for KeyboardView

Methods: handleBack

0
                // 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; 
                    } 
                } 
                break; 
                 
            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 let the application to the delete itself. 
                if (mComposing.length() > 0) { 
                    onKey(Keyboard.KEYCODE_DELETE, null); 
                    return true; 
                } 
                break;