Getting a KeyEvent from a char?
Hello,
Basically what I would like to do is send a string to my method, slice it up into characters, and convert these characters to KeyEvent, and one at a time send them to the keyboard via Robot.
For example, I want my input to be this:
"HELLO"
and my method will do the following:
robot.keyPress(KeyEvent.VK_H);
robot.keyPress(KeyEvent.VK_E);
robot.keyPress(KeyEvent.VK_L);
robot.keyPress(KeyEvent.VK_L);
robot.keyPress(KeyEvent.VK_O);
Unfortunately, I can't exactly fathom how this is possible. I noticed that you can go to the other way - converting from the KeyEvent to the letter with the KeyEvent.getKeyText method - but there is no method that I can find that will produce the desired results.
Thanks in advance for any help.

