Java Robot does not simulate TAB KEY in Windows8. What for? and how can i fix this?

I tried to simulate TAB KEY using a class java.awt.Robot;

in Windows8 , but it doesn't work (just like without keypress). I tried on OS X Yosemite , it worked great.

try {
   Robot robot = new Robot();
   robot.setAutoDelay(50);
   robot.keyPress(KeyEvent.VK_TAB);
   robot.keyRelease(KeyEvent.VK_TAB);
}catch (AWTException e){}

      

Can someone tell me why this isn't working? and how can I simulate a tab in Windows8 ?

Another question: what does this method do?

robot.waitForIdle()

      

+3


source to share





All Articles