Review request for 7142565 - [macosx] Many special keys processed twice in text fields
leonid.romanov at oracle.com
Wed Feb 8 02:41:53 PST 2012
Could you please verify that your fix works with key events synthesized by Robot? It is quite possible that for Robot the same NSEvent instance would be reused.
On 08.02.2012, at 13:49, Anton V. Tarasov wrote:
> Please review a fix for 7142565.
> webrev: http://cr.openjdk.java.net/~ant/7142565/webrev.0/
> Key-equivalent events (typically with modifiers, but not only) are delivered to NSWindow with
> performKeyEquivalent: The latter always returns NO (to let NSWindow process system key events like
> Cmd+Q). According to the spec "if a key-equivalent is not recognized, NSWindow sends it as an
> NSKeyDown event to the first responder". (However, it doesn't send NSKeyDown for Control-key
> Instead of inspecting a key-equivalent event to determine if it should be propagated further or not,
> another simple workaround is suggested. It's to store a pointer to the latest processed key event in
> AWTView and compare the current event to the previous one. In case the event objects are the same,
> ignore the second (current) one.
More information about the macosx-port-dev