I'm writing a Robot and wonder what is the command to press Enter (the key on the very right side, not the Enter above the shift).
The reason for this is because I have an application that the Enter (or Return) is only by the very right enter key.
Not for Java. Run the following program, and press all the keys you want to see how Java sees them:
A little testing shows that it does recognize the difference between the keys on the numeric keypad and the matching keys on the rest of the keyboard when numlock is active, it doesn't see a difference between:
- left and right shift
- left and right control
- left and right alt
- "regular" enter and keypad enter
- "regular" insert and keypad insert
- "regular" delete and keypad delete
- "regular" home and keypad home
- "regular" end and keypad end
- "regular" page up and keypad page up
- "regular" page down and keypad page down
If your other program does it recognize these differences it uses a lower-level technique of finding the differences.
subject: Java Robot - how to press the keypad enter key