This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 25381

Summary: KeyStrokeEditor lacks support for getMenuShortcutKeyMask
Product: guibuilder Reporter: James Devenish <devenish>
Component: CodeAssignee: issues@guibuilder <issues>
Status: NEW ---    
Severity: blocker CC: rost
Priority: P4    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description James Devenish 2002-07-08 04:48:15 UTC
The KeyStrokeEditor provides CTRL_MASK, etc., but
does not provide
java.awt.Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
and thus developers have to enter accelerator keys
for menu items as user code, making the
KeyStrokeEditor useless.

getMenuShortcutKeyMask is especially useful
(sensible, robust, important, crucial?) for
platform portability of menu item accelerator
keys.

The lack of support for this option in the
KeyStrokeEditor discourages developers from
considering this aspect of portability.

In addition to the current constants CTRL_MASK,
ALT_MASK, etc., I think that the KeyStrokeEditor
should provide the platform-neutral
getMenuShortcutKeyMask option.
Comment 1 Tomas Pavek 2002-07-09 14:12:09 UTC
Sounds reasonable to me. But now it's too late to 
implement it in NB 3.4. We'll consider it for 4.0. Thanks 
for pointing this out.
Comment 2 Tomas Pavek 2005-05-16 16:19:21 UTC
Nice to have for 4.2. Let's see if we can make it.
Comment 3 rost 2010-07-26 20:53:51 UTC
Eight years after the initial bugreport I just run into the same issue. Developing an application that is well-behaved on Linux, Windows and OS X requires the usage of getMenuShortcutKeyMask. Unfortunately, I still have to code this without the help of the KeyStrokeEditor...