2012-01-28 6 views

答えて

11
robot.keyPress(KeyEvent.VK_CONTROL) 
robot.keyPress(KeyEvent.VK_Z) 
// CTRL+Z is now pressed (receiving application should see a "key down" event.) 
robot.keyRelease(KeyEvent.VK_Z) 
robot.keyRelease(KeyEvent.VK_CONTROL) 
// CTRL+Z is now released (receiving application should now see a "key up" event - as well as a "key pressed" event).