Hi Prasanta,

 

<<Have you checked for JMenuItem too? It seems we have similar 
updateMnemonicBinding in BasicMenuUI too which is not modified.
I have made changes for JOptions_Pane, JMenu, JTabbedPane and JTextField. 

I have made changes to the awt_component.cpp  also, as if ALT_GRAPH key is 
treated as Alt+Ctrl, it results in Keychar being set as UNDEFINED_CHAR. But 
this Keychar is used inside  SwingUtilities->notifyAction method and needs to 
be set properly.

I think there is nothing wrong in code changes made in awt_component as that 
only this particular functions treats ALTGr as ALT+CTRL and we are not handling 
the ALTGr as ALT+CTRL anywhere else. I have run all jtreg and jck  tests on 
Windows for event handling and everything seems to work fine.

 

<<Regarding the test, I think it will be good if you create the option pane 
dialog "when" JMenu is selected and not "after". Also, you can probably iterate 
for different installed look and feels instead of testing only the default L&F.
Done.

 

Webrev:

http://cr.openjdk.java.net/~pbansal/8194873/webrev.01/

 

Regards,

Pankaj Bansal

 

From: Prasanta Sadhukhan 
Sent: Wednesday, March 28, 2018 1:52 PM
To: Pankaj Bansal; Sergey Bylokhov; swing-dev@openjdk.java.net
Subject: Re: [11] JDK-8194873: right ALT key hotkeys no longer work in Swing 
components

 

Hi Pankaj,

Have you checked for JMenuItem too? It seems we have similar 
updateMnemonicBinding in BasicMenuUI too which is not modified.

Regarding the test, I think it will be good if you create the option pane 
dialog "when" JMenu is selected and not "after". Also, you can probably iterate 
for different installed look and feels instead of testing only the default L&F.

Regards
Prasanta

On 3/26/2018 5:36 PM, Pankaj Bansal wrote:

Hi All,

 

Please review the test only fix for JDK 11.

 

Bug:

https://bugs.openjdk.java.net/browse/JDK-8194873

 

webrev:

HYPERLINK 
"http://cr.openjdk.java.net/%7Epbansal/8194873/webrev.00/"http://cr.openjdk.java.net/~pbansal/8194873/webrev.00/

 

 

Issue:

The right ALT key is not working as mnemonic for some Swing components like 
JMenu or JOptionsPane. The left ALT key works fine.

 

Fix:

This issue was introduced when a check for VK_RMENU was added in 
GetJavaModifiers function in awt_Component.cpp. Windows gives true for both 
VK_MENU and VK_RMENU when right ALT (ALT_GRAPH ) key is pressed. Due to which 
extra bits are set on modifiers. So the mnemonic bindings should be updated to 
work with both ALT and (ALT+ALT_GRAPH) modifiers. Changes have been made in 
mnemonic bindings.  

 

Regards,

Pankaj Bansal

 

Reply via email to