RFR: 8150709: Mac OSX and German Keyboard Layout (Y/Z) [v7]

Martin Fox duke at openjdk.org
Mon Apr 10 20:57:48 UTC 2023


On Wed, 5 Apr 2023 13:25:00 GMT, Jose Pereda <jpereda at openjdk.org> wrote:

>> Martin Fox has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Added manual cross-platform keyboard handling test
>
> tests/manual/events/KeyboardTest.java line 458:
> 
>> 456:         GERMAN("German", KeyListBuilder.germanKeys()),
>> 457:         LATIN("Latin", KeyListBuilder.latinKeys()),
>> 458:         NON_LATIN("non-Latin", KeyListBuilder.nonLatinKeys());
> 
> How hard would be adding another languages to this test, like Spanish? I see that you already commented that the robot can't access dead keys (so no possible test for `ñ` for instance...)?

I added Spanish and found a bug in this PR, I wasn't handling the inverted exclamation mark. I've added it and Euro to match the Windows code.

I can't test the `ñ` key on the Spanish layout since there's no corresponding KeyCode. This applies to most (all?) characters that include a diacritic.

Most dead keys do have KeyCodes so in theory a Robot could generate key press events for them. This might even work on Windows and Linux though I haven't tested it. I've prototyped the Mac code but I think that would be a separate PR.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/425#discussion_r1162080211


More information about the openjfx-dev mailing list