Нажатие клавиши:
try {
Robot bot = new Robot();
bot.keyPress(KeyEvent.VK_F11);
bot.keyRelease(KeyEvent.VK_F11);
}
catch (AWTException ignore) { }
}
Нажатие кнопок мышки:
try {
Robot bot = new Robot();
bot.mousePress(InputEvent.BUTTON1_MASK);
bot.mouseRelease(InputEvent.BUTTON1_MASK);
lastClickTime = System.currentTimeMillis();
}
catch (AWTException ignore) { }