public class KeyEvent
extends java.lang.Object
Constructor and Description |
---|
KeyEvent() |
KeyEvent(AndroidKey key) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
build()
Builds a map, which is ready to be used by the downstream API.
|
KeyEvent |
withFlag(KeyEventFlag keyEventFlag)
Adds the flag.
|
KeyEvent |
withKey(AndroidKey key)
Sets the key code.
|
KeyEvent |
withMetaModifier(KeyEventMetaModifier keyEventMetaModifier)
Adds the meta modifier.
|
public KeyEvent()
public KeyEvent(AndroidKey key)
public KeyEvent withKey(AndroidKey key)
key
- Native Android key.public KeyEvent withMetaModifier(KeyEventMetaModifier keyEventMetaModifier)
keyEventMetaModifier
- Native Android modifier value. Multiple modifiers can
be combined into a single key event.public KeyEvent withFlag(KeyEventFlag keyEventFlag)
keyEventFlag
- Native Android flag value. Several flags can
be combined into a single key event.public java.util.Map<java.lang.String,java.lang.Object> build()
java.lang.IllegalStateException
- if key code is not set