Send key event command

Sends a keyboard event to the device. Uses standard Android keycodes. Key codes and metastates are defined by Android.

For example: Key code = 29 and the Metastate = 1 will print an "A"; Key code = 29 and the Metastate = 0 will print an "a"

Parameters

Name Type Possible values Description

Device ID*

Device

 

The device for this command.

Key code

Number

See this KeyEvent article

The key code key event to send to the device.

Metastate

Number

See this MetaKeyKeyListener article

The metastate key event to send to the device.

Comment

String

 

Adds a comment to the script

On-fail Result*

Condition

Ignore | Break | Continue | Abort | Catch

The behavior when the command fails.

* Mandatory parameter