How do you get the VK code from a char that is a letter? It seems like you should be able to do something like javax.swing.KeyStroke.getKeyStroke(\'c\').getKeyCode()<
AWTKeyStroke.getAWTKeyStroke("C").getKeyCode();
I am using the following code for upper-case letters and numbers in a class I wrote to extend Robot:
public void typeLetterOrNumber(char c) {
if(Character.isLetter(c)) {
keyPress((int)c);
keyRelease((int)c);
}
else if(Character.isDigit(c)) {
keyPress(48+(int)c);
keyRelease(48+(int)c);
}
}
Basically, I just looked at the KeyEvent.VK_whatever values and did the appropriate math to compensate in my code.