📅  最后修改于: 2022-03-11 14:52:26.803000             🧑  作者: Mango
public static void pressEnterKey() {
Robot robot1 = null;
try {
robot1 = new Robot();
} catch (AWTException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
robot1.keyPress(KeyEvent.VK_ENTER);
robot1.keyRelease(KeyEvent.VK_ENTER);
}