<AWT Dev>  Review request for 8028617: Dvorak keyboard mapping not honored when ctrl key pressed
petr.pchelko at oracle.com
Fri May 23 15:23:16 UTC 2014
Did you run all the KeyEvent-related regression tests?
May be we could right a regression test for this one? From your evaluation I have an impression that Ctrl+Key combination is now broken in normal layout too? Is this correct?
With best regards. Petr.
On May 23, 2014, at 7:14 PM, anton nashatyrev <anton.nashatyrev at oracle.com> wrote:
> could you please review the following fix:
> fix: http://cr.openjdk.java.net/~anashaty/8028617/9/webrev.00/ <http://cr.openjdk.java.net/%7Eanashaty/8028617/9/webrev.00/>
> bug: https://bugs.openjdk.java.net/browse/JDK-8028617
> Problem: Dvorak keyboard mapping not honored when Ctrl key pressed
> The problem is in the AWTView.m:deliverJavaKeyEventHelper(): for taking a character we use NSEvent::characters which works fine until the Ctrl modifier is pressed. In this case the 'charaters' returns empty string. The typed character is then calculated via key code using the standard keyboard layout. Of course that doesn't work for any other layout including DVORAK.
> Fix: We should use NSEvent::charactersIgnoringModifiers property instead (especially taking into account that sun.lwawt.macosx.event.NSEvent constructor parameter name is 'charactersIgnoringModifiers')
More information about the awt-dev