Hi Petr,

There's a similar code in Glass already (see GlassViewDelegate.m), it looks like this:

            // Quirk in Firefox: If we have to generate a key-typed and this
            // event is a repeat we will also need to generate a fake RELEASE 
event
            // because we won't see a key-release.
            if ([theEvent isARepeat]) {
                SEND_KEY_EVENT(com_sun_glass_events_KeyEvent_RELEASE);
            }

Have you investigated the -isARepeat flag and whether we want to do the same in JDK?

--
best regards,
Anthony

On 4/1/2013 17:42, Petr Pchelko wrote:
Hello, AWT team.

Please review the fix for the following issue:
http://bugs.sun.com/view_bug.do?bug_id=8010009
The fix is available at:
http://cr.openjdk.java.net/~pchelko/8010009/webrev.00/

The problem occurred because we use input methods for plugin keyboard input. So when the text from the input method comes only KEY_TYPED events were synthesized. Now we also synthesize KEY_RELEASED events. Additionally, the last keyCode should be stored because some swing code relies on the keyCode for the KEY_RELEASED event.

There still are 2 issues around this:
1. Firefox has a very strange behavior when user types extremely fast. KeyReleased events come from the browser, while they should not according to the NPAPI specification. I suppose it is a bug in Firefox. I did not add any workaround for this issue, because I there is no way to add it safely. The workaround could possible break the existing code. So I suppose it is better to file a bug to Mozilla. 2. The game from Pogo does not expect some possible combinations of events coming and skips squares if you type for example " 'r " . This should probably be filed to Pogo Games.

With best regards. Petr.

Reply via email to