Freigeben über


WebViewClient.OnUnhandledKeyEvent(WebView, KeyEvent) Method

Definition

Notify the host application that a key was not handled by the WebView.

[Android.Runtime.Register("onUnhandledKeyEvent", "(Landroid/webkit/WebView;Landroid/view/KeyEvent;)V", "GetOnUnhandledKeyEvent_Landroid_webkit_WebView_Landroid_view_KeyEvent_Handler")]
public virtual void OnUnhandledKeyEvent (Android.Webkit.WebView? view, Android.Views.KeyEvent? e);
[<Android.Runtime.Register("onUnhandledKeyEvent", "(Landroid/webkit/WebView;Landroid/view/KeyEvent;)V", "GetOnUnhandledKeyEvent_Landroid_webkit_WebView_Landroid_view_KeyEvent_Handler")>]
abstract member OnUnhandledKeyEvent : Android.Webkit.WebView * Android.Views.KeyEvent -> unit
override this.OnUnhandledKeyEvent : Android.Webkit.WebView * Android.Views.KeyEvent -> unit

Parameters

view
WebView

The WebView that is initiating the callback.

e
KeyEvent

The key event.

Attributes

Remarks

Notify the host application that a key was not handled by the WebView. Except system keys, WebView always consumes the keys in the normal flow or if #shouldOverrideKeyEvent returns true. This is called asynchronously from where the key is dispatched. It gives the host application a chance to handle the unhandled key events.

Java documentation for android.webkit.WebViewClient.onUnhandledKeyEvent(android.webkit.WebView, 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