Integrated: 8064787: [macosx] In Nimbus LaF, Ctrl+Alt mnemonic doesn't work
Prasanta Sadhukhan
psadhukhan at openjdk.org
Mon Aug 8 11:44:18 UTC 2022
On Thu, 14 Jul 2022 08:03:34 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
> In SwingSet2 application, "File" menu has a visible mnemonic set on F.
>
> 
>
> 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 <psadhukhan at openjdk.org>
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
More information about the client-libs-dev
mailing list