Hi Guys!
Is there any way by which we can generate the keyboard event programmatically?
Hi Guys!
Is there any way by which we can generate the keyboard event programmatically?
Hi,
I suppose you mean “press a specific button at the keyboard??”
I’m using the following code with success…
import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.KeyEvent
Robot robot;
try {
robot = new Robot();
robot.keyPress(KeyEvent.VK_F11);
robot.keyRelease(KeyEvent.VK_F11);
} catch (AWTException e) {
LogManager.error(logger, "F11 key could not be pressed",e);
}