I’ve created a AutoTyper in Java today, i’ve got it handling brackets etc.
Now i’m trying to get it to push out the @ symbol, by doing the method below:
private void typeCharacter(int character) {
try {
switch (character) {
case '@':
robot.keyPress(KeyEvent.VK_SHIFT); // hits shift, enabling the @ symbol.
robot.keyPress(KeyEvent.VK_NUMPAD2); // hits the @ symbol.
robot.keyRelease(KeyEvent.VK_NUMPAD2); // releases the @ symbol.
break;
default:
robot.keyPress(character);
}
} catch (IllegalArgumentException ee) {
ee.printStackTrace();
}
}
Only way I can think of doing it, basically the same way i’d do it on my keyboard, Shift + numPad 2 = ‘@’, but half the time it just spits out the # ‘2’?
Kind of a short post for a big problem to me lol, if anyone needs some methods or some snippets of teh code let me know :).