public final class EventCreator extends Object
KeyEvent event is provided.SystemCapability.MultimodalInput#MULTIMODAL_INPUTpublic static Optional<KeyEvent> createKeyEvent(int action, int keyCode)
KeyEvent object based on the specified action and keycode.action - Indicates the action taken for the key. The value can be
KeyEvent.KEY_PRESSED or
KeyEvent.KEY_RELEASED.keyCode - Indicates the keycode for the key. For details about the keycodes,
see KeyEvent.KeyEvent object; returns an empty object if action is not a valid
value, or the keyCode value is less than or equal to 0 or greater than the maximum keycode
(KeyEvent.NOW_MAX_KEY) defined in the system.