On Tue, 31 Mar 2026 02:08:18 GMT, Prasanta Sadhukhan <[email protected]> wrote:
>> src/java.desktop/share/classes/javax/swing/SwingUtilities.java line 907: >> >>> 905: /** >>> 906: * Returns the system mnemonic key mask to be used >>> 907: * for shortcut keymask and/or accelerator keymask >> >> IMO that is too vague. I'd like to see more precise and more helpful / >> descriptive text here. >> >> Also I see that SU2 will return ALT_MASK and I wonder if it (and SunToolkit >> of course) should be returning ALT_DOWN_MASK instead ? >> >> And since this is a JDK defined mask, maybe entirely for Swing, isn't the >> word "System" is mis-leading ? >> Meaning if there's a look up anywhere of what the desktop expects, I'm >> missing it. > > I guess SU2 should use ALT_DOWN_MASK as AT_MASK is deprecated from jdk9 but I > thought it should be done in separate PR and not for this exposure PR where I > guess we donot touch implementation details. > > Regarding "System" I just used the wrapper over SU2 so I didn't change..I can > change the public API to `getSwingShortcutKeyMask` as it caters to > accelerator and mnemonic both, if there is consensus.. javadoc updated with descriptive text ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30366#discussion_r3019580398
