The Robot implementation on Linux did not consult the current layout when 
mapping from a KeyCode to a hardware code. Internally it retrieved results for 
all the layouts but just picked the first one it saw leading to random effects. 
Though not part of the original bug report, the code also ignored the shift 
level when choosing which result to pick. On a French layout the dollar sign is 
on two keys (AltGr 4 is the second one) and the code could choose either one. 
Same is true for pound.

This PR consults the current layout and only on shift level 0 which is the same 
level used in get_glass_key to figure out which KeyCode to assign when 
generating a KeyEvent.

-------------

Commit messages:
 - Robot no longer gets confused by multiple layouts

Changes: https://git.openjdk.java.net/jfx/pull/718/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=718&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8278924
  Stats: 86 lines in 3 files changed: 73 ins; 8 del; 5 mod
  Patch: https://git.openjdk.java.net/jfx/pull/718.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/718/head:pull/718

PR: https://git.openjdk.java.net/jfx/pull/718

Reply via email to