<AWT Dev> <AWT dev>[9] Review request for 8139189: VK_OEM_102 dead key detected as VK_UNDEFINED
Alexandr Scherbatiy
alexandr.scherbatiy at oracle.com
Fri May 27 11:47:55 UTC 2016
The fix looks good to me.
Thanks,
Alexandr.
On 5/17/2016 12:23 PM, Semyon Sadetsky wrote:
> Hello,
>
> Please review fix for JDK9:
>
> bug: https://bugs.openjdk.java.net/browse/JDK-8139189
> webrev: http://cr.openjdk.java.net/~ssadetsky/8139189/webrev.00/
>
> The Programmer Dvorak keyboard layout uses compose-like key that allow
> type glyphed letters like diacritic or caron.
> This functionality does not work in JDK since the
> https://bugs.openjdk.java.net/browse/JDK-4053800 fix which changed key
> to java character mapping procedure to use ToAscii() call wiche later
> was replaced by ToUnicodeEx() call. Both ToAscii() and ToUnicodeEx()
> unrecoverably change the window state related to the keyboard during
> key converting, so all dedicated dead keys stop to work. That is the
> root cause of the issue.
> Since those converting calls are required obtain UTF character for the
> JDK KEY_PRESSED event at the moment of WM_KEYDOWN before, it is
> impossible to get the UTF character for the dead key combination
> without breaking it, because the resulting symbol will only be ready
> after the WM_CHAR event designating that combination is over.
> As a work-around the proposed fix does not call ToUnicodeEx() after
> dead key combination is started and uses the MapVirtualKey() call
> return as the value to send with java's KEY_PRESSED/KEY_RELEASED events.
>
> --Semyon
More information about the awt-dev
mailing list