Android.InputMethodServices.InputMethodService.SendDownUpKeyEvents Method
Send the given key event code (as defined by Android.Views.KeyEvent) to the current input connection is a key down + key up event pair.

Syntax

[Android.Runtime.Register("sendDownUpKeyEvents", "(I)V", "GetSendDownUpKeyEvents_IHandler")]
public virtual void SendDownUpKeyEvents ([Android.Runtime.GeneratedEnum] Android.Views.Keycode keyEventCode)

Parameters

keyEventCode
The raw key code to send, as defined by Android.Views.KeyEvent.

Remarks

Send the given key event code (as defined by Android.Views.KeyEvent) to the current input connection is a key down + key up event pair. The sent events have Android.Views.KeyEvent.FLAG_SOFT_KEYBOARD set, so that the recipient can identify them as coming from a software input method, and Android.Views.KeyEvent.FLAG_KEEP_TOUCH_MODE, so that they don't impact the current touch mode of the UI.

Note that it's discouraged to send such key events in normal operation; this is mainly for use with Android.Text.IInputType.TYPE_NULL type text fields, or for non-rich input methods. A reasonably capable software input method should use the Android.Views.InputMethods.InputConnection.commitText(java.lang.CharSequence, int) family of methods to send text to an application, rather than sending key events.

[Android Documentation]

Requirements

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