On Wed, 6 Oct 2021 19:42:41 GMT, Johan Vos <j...@openjdk.org> wrote: >> @tomsontom I've added the Swing-style code as WIP PR #519. There are >> comments in the PR that probably should be in the code but I wanted to >> reduce the code diffs. >> >> PR #519 (and Swing) tend to get codes for punctuation keys wrong on non-US >> layouts. That's not a big issue for accelerator processing since >> accelerators involving punctuation should use KeyCharacterCombinations which >> work even if the underlying key codes are wrong. (I can't seem to find >> documentation that tells developers how to choose between >> KeyCodeCombinations and KeyCharacterCombinations. Am I missing something?) >> >> There are isolated instances where PR #519 assigns a letter code to a >> punctuation key. For example, on the French keyboard it assigns KeyCode.M to >> the comma/question mark key which is where the M key is on the US layout. >> This means an app that uses both M and one of those punctuation characters >> as accelerators might see both fire. This might be a non-issue, the same >> problem afflicts the current code and I didn't run across any bugs on that. > > @beldenfox Can you somehow add the test you talked about in a previous > comment? It always helps to have a test that fails before and succeeds after. > Let me know if you need help with this?
@johanvos I've attached my test app to this comment. The test I was referring to is invoked using the `A-Z Test` button down at the bottom. The test just sends KeyCodes A-Z using the Robot and verifies that the expected KeyCodes and characters come back. [KeyboardTest.txt](https://github.com/openjdk/jfx/files/7296937/KeyboardTest.txt) ------------- PR: https://git.openjdk.java.net/jfx/pull/425