Login  Register

How to deal with international keyboard layouts?

Posted by Schred on Mar 02, 2020; 2:11pm
URL: https://forum.jogamp.org/How-to-deal-with-international-keyboard-layouts-tp4040401.html

While in the process of creating an undo/redo system, I discovered that the 'z' key on my keyboard corresponded to the 'y' keycode in the newt KeyEvent, and the other way around (so typing 'z' results in a keycode of 89 eventhough it's specified as 90, and 'y' is the same but in reverse).
This is probably due to the different layout of my German keyboard, since when I switched it to the American one, the problem was fixed.
That wouldn't be too bad as I could just use the getKeyChar() method to get the corresponding character, but in combination with keys like control this doesn't work either.

How do I fix this?