Hello,
I want to use the java.awt.Robot
class to implement a virtual keyboard. I am wondering if there is a way to send the keycode WITH the key location (left or right) using the keyPress(int)
method. If you add a KeyListener
to an awt Element, a KeyEvent
triggered by ctrl or shift has an information if it was the left or right button.
The Docs tells:
Key codes that have more than one physical key associated with them (e.g.
KeyEvent.VK_SHIFT
could mean either the left or right shift key) will map to the left key".
But is there really no way to send a right shift pressed? Some applications (eg. VirtualBox) need those right buttons (sure, you might configure those applications, but thats no option for a virtual keyboard).
So... is there a way to do this with the Robot
class?
Is there an alternative way to send more specific key events in Java?