<AWT Dev> [7u12] Review request for 7196547: [macosx] Implement dead key detection for KeyEvent

Alexander Scherbatiy alexandr.scherbatiy at oracle.com
Fri Sep 28 06:33:00 PDT 2012


bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7196547
webrev: http://cr.openjdk.java.net/~alexsch/7196547/webrev7.00

This is a backport of the issue from the JDK 8 to JDK 7u12

The only changes are that  calls to NsCharToJavaVirtualKeyCode methods 
are updated because some key events are processed on the native level in 
JDK 7.
The updated NsCharToJavaVirtualKeyCode calls use the isDeadChar=NO 
parameter because finally the dead keys are retrieved from the 
nsToJavaKeyInfo in the handleKeyEvent method from the CPlatformResponder 
class.

JDK 8 fix description:

The characters method from the NSEvent class returns an empty string for 
dead keys.
The fix uses the UCKeyTranslate() method  to know a dead key state from 
the key code and key modifiers on the first step,
and  dead key state and space key to know the dead key char actual value 
on the second step.


Thanks,
Alexandr.




More information about the awt-dev mailing list