public interface KeyboardRobot
Modifier and Type | Method and Description |
---|---|
Set<KeyCode> |
getPressedKeys()
Gets the keys that have been pressed and not released.
|
void |
press(KeyCode... keys)
Presses given keys, until explicitly released via
release(KeyCode...) . |
void |
pressNoWait(KeyCode... keys)
Presses given keys, until explicitly released via
release(KeyCode...) . |
void |
release(KeyCode... keys)
Releases given keys.
|
void |
releaseNoWait(KeyCode... keys)
Releases given keys.
|
void press(KeyCode... keys)
release(KeyCode...)
. Once pressed,
WaitForAsyncUtils.waitForFxEvents()
is called.keys
- the key codesvoid pressNoWait(KeyCode... keys)
release(KeyCode...)
.
WaitForAsyncUtils.waitForFxEvents()
is not called.keys
- the key codesSet<KeyCode> getPressedKeys()
void release(KeyCode... keys)
WaitForAsyncUtils.waitForFxEvents()
is called.
Note: passing in an empty KeyCode[]
will release all pressed keys.keys
- the key codesvoid releaseNoWait(KeyCode... keys)
WaitForAsyncUtils.waitForFxEvents()
is not called.
Note: passing in an empty KeyCode[]
will release all pressed keys.keys
- the key codes