On Thu, 14 Jul 2022 08:03:34 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

> In SwingSet2 application, "File" menu has a visible mnemonic set on F.
> 
> ![image](https://user-images.githubusercontent.com/43534309/178932400-ab70602a-9c4f-4cab-b3b7-0508b26d2ebe.png)
> 
> Now, in MacOS, with Aqua, Java (Metal), and Motif LaF, one can open the menu 
> pressing Ctrl+Alt+F. 
> But with Nimbus L&F, to open File menu, you have to press Alt+F even on OS X.
> 
> It should work with Ctrl+Alt+F as sun/lwawt/macosx/LWCToolkit.java. 
> getFocusAcceleratorKeyMask() 
> has CTRL_MASK | ALT_MASK
> 
> Fix is to add Menu.shortcutKeys in SynthLookAndFeel default table so that it 
> can call SwingUtilities2.getSystemMnemonicKeyMask() which will call either 
> LWCToolkit.getFocusAcceleratorKeyMask() or 
> SunToolkit.getFocusAcceleratorKeyMask() depending on platform.
> 
> No regression test is added as it can be checked with SwingSet2 app.

This pull request has now been integrated.

Changeset: b2f0cbdc
Author:    Prasanta Sadhukhan <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/b2f0cbdca109507e5f8e0c185f601c0c1e31f4fb
Stats:     5 lines in 1 file changed: 5 ins; 0 del; 0 mod

8064787: [macosx] In Nimbus LaF, Ctrl+Alt mnemonic doesn't work

Reviewed-by: prr, dnguyen

-------------

PR: https://git.openjdk.org/jdk/pull/9488

Reply via email to