RFR: 8273743: KeyCharacterCombination for "+" does not work on US QWERTY keyboard layout [v3]

Martin Fox duke at openjdk.org
Tue Apr 25 17:15:23 UTC 2023


On Fri, 21 Apr 2023 19:16:22 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Martin Fox has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits:
>> 
>>  - Merge remote-tracking branch 'upstream/master' into scancode
>>  - Added manual test for KeyCharacterCombination matching
>>  - New KeyCharacterCombination implementation
>
> For some reason, Command-+ on Mac did not generate console output in KeyCharComboTest (in the ticket).
> Using Windows+L (on the attached IBM keyboard) did generate stdout, but not Windows-+.
> 
> Am I doing something wrong?

@andy-goryachev-oracle This bug is Linux-specific and this PR only fixes Linux. It's still worth testing on Mac and Windows just to verify that they're not affected. Those platforms also have problems with KeyCharacterCombinations but I entered separate bugs, see [JDK-8274967](https://bugs.openjdk.org/browse/JDK-8274967) for Windows and [JDK-8087700 ](https://bugs.openjdk.org/browse/JDK-8087700) for Mac. I updated my comment in the Mac bug to better explain the behavior you're seeing.

Since this PR was submitted I have written the KeyboardTest app submitted as part of PR #425 which includes tests for KeyCharacterCombinations and covers a lot of keys in one go. Unfortunately that test relies on robust Robot code and right now only Windows has that (Linux is waiting on #718 and Mac on #425). It's also good to have the final Robot code in place since it's reasonable for an implementation to re-use that code when transitioning to `Toolkit.getKeyCanGenerateCharacter`. 

The core Java code in the PR is mostly plumbing and is still worth reviewing. I needed to transition at least one platform to the new machinery to validate it but in retrospect Linux was probably not the right choice. Eventually I should close out this PR and re-submit the code with the Windows front- and back-ends in place so we can use the semi-automated KeyboardTest app instead.

BTW, when I originally started working on this I wasn't planning on getting KeyCharacterCombinations working with the numeric keypad. That's why the original bug report assumed all testing would be restricted to the main keyboard and the test app in this PR prevents testing on the keypad. But the new Toolkit call makes it (relatively) easy to fix [JDK-8090275](https://bugs.openjdk.org/browse/JDK-8090275) so all that's obsolete. Sorry for the confusion.

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

PR Comment: https://git.openjdk.org/jfx/pull/694#issuecomment-1522140672


More information about the openjfx-dev mailing list