Språk

InputConnectionWrapper.SendKeyEvent(KeyEvent) Method

Definition

Send a key event to the process that is currently attached through this input connection.

[Android.Runtime.Register("sendKeyEvent", "(Landroid/view/KeyEvent;)Z", "GetSendKeyEvent_Landroid_view_KeyEvent_Handler")]
public virtual bool SendKeyEvent(Android.Views.KeyEvent? e);
[<Android.Runtime.Register("sendKeyEvent", "(Landroid/view/KeyEvent;)Z", "GetSendKeyEvent_Landroid_view_KeyEvent_Handler")>]
abstract member SendKeyEvent : Android.Views.KeyEvent -> bool
override this.SendKeyEvent : Android.Views.KeyEvent -> bool

Parameters

e
KeyEvent

The key event.

Returns

true on success, false if the input connection is no longer valid.

Implements

Attributes

Remarks

Send a key event to the process that is currently attached through this input connection. The event will be dispatched like a normal key event, to the currently focused view; this generally is the view that is providing this InputConnection, but due to the asynchronous nature of this protocol that can not be guaranteed and the focus may have changed by the time the event is received.

Java documentation for android.view.inputmethod.InputConnectionWrapper.sendKeyEvent(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