Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.awt.Robot emulating Keys on different Keyboard Layouts

843807Dec 28 2008
Hi
i am trying t write an Remote Application which should emulate the Keyboard on the Remote PC.
What i want is, that it acts on any PC/MAC/Keyboard Layout.
Because the java.awt.Robot doesnt use Virtual Keycodes as one uses with Keyloggers.
I found out that Robot really simulates the real Keys on the Keyboard.
So if i want to emulate typing the "@" Symbol, on a German Apple Keyboard i have to Press ALT + L
on a English Apple KEyboard its SHIFT+2 and on a German WIndows Keyboard its ALT GR + Q.
My Question now is, if there's a better solution than let the user pick his Keyboard Layout and do crazy if/else loops.
Probably there is no physical emulation possible but possibly i can find out what Keyboard Layout the user is using?
Do have have any other ideas how to emulate the Keyboard on all different PC Configurations, Systems Keyboard?
Thanks IN Advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 25 2009
Added on Dec 28 2008
0 comments
403 views