Im trying to make java robot hold down the command key.
I have used the following code.
robot.keyPress(KeyEvent.VK_META); robot.Delay(5000); robot.keyRelease(KeyEvent.VK_META);
This doesant seem to do the trick. Yes I have searched on how to do this but cannot find a working answer.
Am I using the wrong keycode?
Ive also tried
robot.keyPress(KeyEvent.META_MASK); and robot.keyPress(KeyEvent.META_DOWN_MASK);
Ive also tried keycodes, 91 and 93.