Android.AccessibilityServices.AccessibilityService.OnKeyEvent Method
Callback that allows an accessibility service to observe the key events before they are passed to the rest of the system.

Syntax

[Android.Runtime.Register("onKeyEvent", "(Landroid/view/KeyEvent;)Z", "GetOnKeyEvent_Landroid_view_KeyEvent_Handler")]
protected virtual bool OnKeyEvent (Android.Views.KeyEvent e)

Parameters

e
The event to be processed.

Returns

Documentation for this section has not yet been entered.

Remarks

Callback that allows an accessibility service to observe the key events before they are passed to the rest of the system. This means that the events are first delivered here before they are passed to the device policy, the input method, or applications.

Note: It is important that key events are handled in such a way that the event stream that would be passed to the rest of the system is well-formed. For example, handling the down event but not the up event and vice versa would generate an inconsistent event stream.

Note: The key events delivered in this method are copies and modifying them will have no effect on the events that will be passed to the system. This method is intended to perform purely filtering functionality.

[Android Documentation]

Requirements

Namespace: Android.AccessibilityServices
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 18