Class KeyEvent
java.lang.Object
io.appium.java_client.android.nativekey.KeyEvent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a map, which is ready to be used by the downstream API.withFlag(KeyEventFlag keyEventFlag) Adds the flag.withKey(AndroidKey key) Sets the key code.withMetaModifier(KeyEventMetaModifier keyEventMetaModifier) Adds the meta modifier.
-
Constructor Details
-
KeyEvent
public KeyEvent() -
KeyEvent
-
-
Method Details
-
withKey
Sets the key code. This code is mandatory.- Parameters:
key- Native Android key.- Returns:
- self instance for chaining
-
withMetaModifier
Adds the meta modifier.- Parameters:
keyEventMetaModifier- Native Android modifier value. Multiple modifiers can be combined into a single key event.- Returns:
- self instance for chaining
-
withFlag
Adds the flag.- Parameters:
keyEventFlag- Native Android flag value. Several flags can be combined into a single key event.- Returns:
- self instance for chaining
-
build
Builds a map, which is ready to be used by the downstream API.- Returns:
- API parameters mapping
- Throws:
IllegalStateException- if key code is not set
-