-
- All Known Implementing Classes:
KeyboardRobotImpl
public interface KeyboardRobot
-
-
Method Summary
Modifier and Type Method Description Set<javafx.scene.input.KeyCode>getPressedKeys()Gets the keys that have been pressed and not yet released.voidpress(javafx.scene.input.KeyCode... keys)Presses the given keys, until explicitly released viarelease(KeyCode...).voidpressNoWait(javafx.scene.input.KeyCode... keys)Presses the given keys, until explicitly released viarelease(KeyCode...).voidrelease(javafx.scene.input.KeyCode... keys)Releases the given keys.voidreleaseNoWait(javafx.scene.input.KeyCode... keys)Releases the given keys.
-
-
-
Method Detail
-
press
void press(javafx.scene.input.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(javafx.scene.input.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<javafx.scene.input.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(javafx.scene.input.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(javafx.scene.input.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
-
-