InputMethodService.OnKeyUp(Keycode, KeyEvent) Method

Definition

Override this to intercept key up events before they are processed by the application.

[Android.Runtime.Register("onKeyUp", "(ILandroid/view/KeyEvent;)Z", "GetOnKeyUp_ILandroid_view_KeyEvent_Handler")]
public override bool OnKeyUp (Android.Views.Keycode keyCode, Android.Views.KeyEvent? e);
[<Android.Runtime.Register("onKeyUp", "(ILandroid/view/KeyEvent;)Z", "GetOnKeyUp_ILandroid_view_KeyEvent_Handler")>]
override this.OnKeyUp : Android.Views.Keycode * Android.Views.KeyEvent -> bool

Parameters

keyCode
Keycode

Returns

Attributes

Remarks

Override this to intercept key up events before they are processed by the application. If you return true, the application will not itself process the event. If you return false, the normal application processing will occur as if the IME had not seen the event at all.

The default implementation intercepts KeyEvent#KEYCODE_BACK KeyEvent.KEYCODE_BACK to hide the current IME UI if it is shown. In addition, in fullscreen mode only, it will consume DPAD movement events to move the cursor in the extracted text view, not allowing them to perform navigation in the underlying application.

Java documentation for android.inputmethodservice.InputMethodService.onKeyUp(int, android.view.KeyEvent).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to