I use the following event to escape a window's pop-up ("This page is ready for print. Would you like to ...") but it seems that the release event doesn't work. Once the test is finished, the keyboard stays locked and I am not able to use it unless I switch the window's user and log in again. The same behavior is observed with other key events (VK_ALT+VK_SPACE+VK_N)
Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_ESCAPE);
robot.delay(5000);
robot.keyRelease(KeyEvent.VK_ESCAPE);
Thank you in advance for your advices!