On Tue, 25 May 2021 18:29:45 GMT, Martin Fox 
<github.com+12087024+belden...@openjdk.org> wrote:

>> @beldenfox I did not say that the swing version is the way to go and in the 
>> end its @kevinrushforth call what route should be taken - I just wanted to 
>> show what my initial change would have been without saying it is better than 
>> what you are proposing which sounds like is more complete than what swing 
>> provides today.
>
> @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?

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

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

Reply via email to