Instrumentation.SendKeySync(KeyEvent) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sends a key event to the currently focused window, and waits for it to be processed.
[Android.Runtime.Register("sendKeySync", "(Landroid/view/KeyEvent;)V", "GetSendKeySync_Landroid_view_KeyEvent_Handler")]
public virtual void SendKeySync (Android.Views.KeyEvent? e);
[<Android.Runtime.Register("sendKeySync", "(Landroid/view/KeyEvent;)V", "GetSendKeySync_Landroid_view_KeyEvent_Handler")>]
abstract member SendKeySync : Android.Views.KeyEvent -> unit
override this.SendKeySync : Android.Views.KeyEvent -> unit
Parameters
- e
- KeyEvent
The event to send to the current focus.
- Attributes
Remarks
Sends a key event to the currently focused window, and waits for it to be processed.
This method blocks until the recipient has finished handling the event. Note that the recipient may <em>not</em> have completely finished reacting from the event when this method returns. For example, it may still be in the process of updating its display or UI contents upon reacting to the injected event.
Java documentation for android.app.Instrumentation.sendKeySync(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.