<AWT Dev> Review request for 8041928: MouseEvent.getModifiersEx gives wrong result
Ambarish Rapte
ambarish.rapte at oracle.com
Tue Dec 22 08:38:06 UTC 2015
Hi,
Can I get one more review for this patch please.
Thanks,
Ambarish
-----Original Message-----
From: Ambarish Rapte
Sent: Monday, December 21, 2015 11:27 AM
To: Sergey Bylokhov; Semyon Sadetsky; Prasanta Sadhukhan; awt-dev at openjdk.java.net
Subject: RE: <AWT Dev> Review request for 8041928: MouseEvent.getModifiersEx gives wrong result
Hi Sergey,
Thanks for the review.
AltGr+C → © is not supported by text component.
Tested with javax.swing.JTextArea & java.awt.TextArea.
Regards,
Ambarish
-----Original Message-----
From: Sergey Bylokhov
Sent: Saturday, December 19, 2015 3:37 AM
To: Ambarish Rapte; Semyon Sadetsky; Prasanta Sadhukhan; awt-dev at openjdk.java.net
Subject: Re: <AWT Dev> Review request for 8041928: MouseEvent.getModifiersEx gives wrong result
Hi, Ambarish.
Fix looks fine. Can you please confirm that combination like AltGr+C → © (copyright sign) works in our text components?
On 09/12/15 18:30, Ambarish Rapte wrote:
> Hi,
>
> Please review the fix for JDK9
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8041928
>
> Webrev: http://cr.openjdk.java.net/~arapte/8041928/webrev.00/
>
> Issue:
>
> The 8041928 issue mentions below problems with the modifiers,
>
> 1.When clicking right button it gives Button3 and the Meta key modifiers.
>
> 2.Alt-Gr modifier is not set.
>
> Cause:
>
> 1.When clicking right button it gives Button3 and the Meta key modifiers.
>
> This is actually not an issue, the right mouse button (BUTTON3_MASK)
> click and META key (META_MASK) share same bit in modifiers.
>
> Please check documentation here,
>
> https://docs.oracle.com/javase/8/docs/api/java/awt/event/MouseEvent.ht
> ml
>
> The important statement from this doc:
>
> (Note: Due to overlap in the values of ALT_MASK/BUTTON2_MASK and
> META_MASK/BUTTON3_MASK, this is not always true for mouse events
> involving modifier keys)
>
> 2.Alt-Gr modifier is not set.
>
> This is an issue, and the patch fixes this issue for Windows.
>
> Also added related manual test.
>
> This bug does not happen on Linux,
>
> But occurs with MACOSX, Shall raise a new MACOSX specific bug to
> continue work.
>
> Fix:
>
> Added check for key code VK_RMENU for windows, while creating the java
> Modifiers of event.
>
> The related test is manual because,
>
> 1.Robot cannot generate the Alt-Gr key event
>
> 2.There are different keyboard layouts, A keyboard may have Alt-Gr key
> or might have to use Ctrl-Alt combination.
>
> 3.For Linux – ubuntu, The alternate graphics key needs to be enabled
> explicitly from System Keyboard settings.
>
> Thanks,
>
> Ambarish
>
--
Best regards, Sergey.
More information about the awt-dev
mailing list