Is there a way to lets say make greenfoot act as if "g" was pressed using the Greenfoot.isKeyDown command.
Basically can I simulate a keystroke without actually pressing the key?
Is there a way to lets say make greenfoot act as if "g" was pressed using the Greenfoot.isKeyDown command.
Basically can I simulate a keystroke without actually pressing the key?
There is the java.awt.Robot class that contains methods like 'keyPress(String key)', 'keyRelease(String key)', 'mouseMove(int x, int y)' 'mousePress(int buttons)' and 'mouseRelease(int buttons)'. Maybe you could use it.