Hello! Thanks for helping me if you decide to
But yeah, i am trying to do the following:
press Left Arrow Key for 1 second, then press up arrow key for 1 second then continue rest of the code!
I have looked all over the internet and i cannot find anything... when i try to use
robot.keyPress(KeyEvent.VK_LEFT);
robot.keyPress(KeyEvent.VK_UP);
// --> Continue rest of the application
it holds on left arrow key and stays looping forever... i even tried using timers but im i guess im not good enough to do that
Please help me, my kind friends!
/edit 2/
never mind.. i did it using a differelong t= System.currentTimeMillis();
long end = t+5000;
while(System.currentTimeMillis() < end) {
robot.keyPress(KeyEvent.VK_LEFT);
}
but now im wondering, how do i stop it from holding that key after the event is done?