-
- All Known Implementing Classes:
KeyboardRobotImpl
public interface KeyboardRobot
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<KeyCode>getPressedKeys()Gets the keys that have been pressed and not yet released.voidpress(KeyCode... keys)Presses the given keys, until explicitly released viarelease(KeyCode...).voidpressNoWait(KeyCode... keys)Presses the given keys, until explicitly released viarelease(KeyCode...).voidrelease(KeyCode... keys)Releases the given keys.voidreleaseNoWait(KeyCode... keys)Releases the given keys.
-
-
-
Method Detail
-
press
void press(KeyCode... keys)
Presses the given keys, until explicitly released viarelease(KeyCode...). Once pressed,WaitForAsyncUtils.waitForFxEvents()is called.- Parameters:
keys- the key codes to press
-
pressNoWait
void pressNoWait(KeyCode... keys)
Presses the given keys, until explicitly released viarelease(KeyCode...).WaitForAsyncUtils.waitForFxEvents()is not called.- Parameters:
keys- the key codes to press without waiting afterwards
-
getPressedKeys
Set<KeyCode> getPressedKeys()
Gets the keys that have been pressed and not yet released.- Returns:
- an (unmodifiable) containing the keys that have been pressed (but not yet) released.
-
release
void release(KeyCode... keys)
Releases the given keys. Once released,WaitForAsyncUtils.waitForFxEvents()is called.Note: passing in an empty
KeyCode[]will release all pressed keys.- Parameters:
keys- the key codes to release
-
releaseNoWait
void releaseNoWait(KeyCode... keys)
Releases the given keys.WaitForAsyncUtils.waitForFxEvents()is not called.Note: passing in an empty
KeyCode[]will release all pressed keys.- Parameters:
keys- the key codes to release without waiting afterwards
-
-