[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: RFR: DRAFT 8274967: KeyCharacterCombinations for punctuation and symbols fail on non-US keyboard
From:       Martin Fox <duke () openjdk ! java ! net>
Date:       2021-12-17 18:29:22
Message-ID: y1ehog639ZKLOQvbW2-chwFuR2G0uSw95UVRRqcRLRE=.636edc05-3dcb-4119-b119-2a87309c8e21 () github ! com
[Download RAW message or body]

On Mon, 15 Nov 2021 20:13:11 GMT, Martin Fox <duke@openjdk.java.net> wrote:

> The code that maps from a Windows virtual key code to a Java key code in \
> `getKeyCodeForChar` did not match the similar code in \
> `ViewContainer::HandleViewKeyEvent`. The OEM keys are assigned to printable \
> punctuation and symbols in ways which vary across layouts and even keyboards. To \
> determine the correct Java key code you have to query the layout to determine the \
> character the key would generate without modifiers and map that character to the \
> key code. `ViewContainer::HandleViewKeyEvent` did this, `getKeyCodeForChar` did \
> not. This PR copies a few snippets of code from `ViewContainer::HandleViewKeyEvent` \
> to make the two algorithms match.

Marking this as DRAFT since this code could be superseded by #694. The review cycles \
weren't wasted since similar code will re-appear in the PR for \
[JDK-8278938](https://bugs.openjdk.java.net/browse/JDK-8278938) which fixes the way \
the Robot code resolves JavaFX KeyCodes.

(And I was wrong when I wrote that `MapVirtualKeyEx` doesn't inform me of dead keys. \
I must have fumbled my testing. Mea culpa.)

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

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic