<AWT Dev> [10] Review request for 8177414: Missing key events on Mac Os

Dmitry Markov dmitry.markov at oracle.com
Wed Aug 2 14:26:34 UTC 2017


Could you review a fix for jdk10, please?

   bug: https://bugs.openjdk.java.net/browse/JDK-8177414
   webrev: http://cr.openjdk.java.net/~dmarkov/8177414/webrev.00/

Problem description:
On OSX KEY_TYPED and KEY_PRESSED events might be lost if the input method such as ‘British’, ‘US International’ is set. That is caused by the current implementation of keyDown() method (see AWTView.m) which is responsible for transmitting native KEY_PRESSED events to java layer. If the flag willBeHandledByComplexInputMethod is set, the method stops sending the events to the java layer. However in some cases we may not have InputMethod object and KEY_PRESSED events will be incorrectly dropped.

In keyDown() we have to check InputMethod object and drop key events only when non-null InputMethod is present.

I ran corresponding JCK and regression tests and did not observe any new failures.


More information about the awt-dev mailing list