On Mon, 17 Jan 2022 20:25:08 GMT, Martin Fox <d...@openjdk.org> wrote:
> 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. modules/javafx.graphics/src/main/native-glass/gtk/glass_key.cpp line 311: > 309: GdkKeymapKey *keys = nullptr; > 310: gint n_keys = 0; > 311: GdkKeymap* keymap = gdk_keymap_get_default(); ` gdk_keymap_get_for_display(gdk_display_get_default())` is the non deprecated way. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/718#discussion_r1161023161