I\'m trying to use Robot in order to switch apps, and then enter some text. To do this (on my mac), I\'m pressing Meta, Tab, and then releasing Tab, Meta in this order:
Ah.. Seems that I need to specify a delay between the events. Updated:
Robot robot = new Robot(); robot.keyPress(KeyEvent.VK_META); robot.delay(300); robot.keyPress(KeyEvent.VK_TAB); robot.keyRelease(KeyEvent.VK_TAB); robot.keyRelease(KeyEvent.VK_META);