/** * Press a specific key using its char representation. * * @param key char representation of the key */ public void keyPress(char key) { /* check for CTRL+X where X is [A-Z] * CTRL+A = 1, A = 65 */ if (key >= 1 && key <= 0x1A) { key = (char) (key + 64); robot.keyPress(key); return; } nativeKeyboard.keyPress(key); }