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 104878 - Menu displays incorrect shortcuts
Summary: Menu displays incorrect shortcuts
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: Stanislav Aubrecht
: 173952 (view as bug list)
Depends on: 15926
  Show dependency tree
Reported: 2007-05-25 22:37 UTC by Petr Jiricka
Modified: 2014-04-11 08:41 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2007-05-25 22:37:03 UTC
Menu Build -> Build Main Project displays F11 as its shortcut. However, this
shortcut in fact does not work - instead it is assigned to the Dashboard system

Either F11 should work for "build main project" or it should not be displayed in
the menu item. This is a major usability problem, thus setting priority to P2.
Comment 1 Milan Kubec 2007-06-13 13:03:59 UTC
I checked with Mac machine and F11 is not shown in the Build menu, what build do you have? JDK?
Comment 2 Petr Jiricka 2007-06-13 13:21:42 UTC
You are right, currently Build Main Project does not have any shortcut. However, that is equally bad.

I have a June 12 build and JDK 1.5.0_07.
Comment 3 Milan Kubec 2007-06-18 15:22:32 UTC
> Either F11 should work for "build main project" or it should not be displayed in the menu item.

Now it's not displayed in the menu and wrote that it's equally bad. So what should be the correct behavior? Do you mean
different shortcut for Macs?
Comment 4 Milan Kubec 2007-06-18 15:31:02 UTC
F11 can reconfigured in Macs System Preferences for Dashboard & Expose. As well as build project action can be
recofigured in IDE to different shortcut. I don't think we can do much about it, if the shortcut is stolen by OS.
Comment 5 Petr Jiricka 2007-06-19 08:09:33 UTC
> You are right, currently Build Main Project does not have any shortcut.

This is now fixed.

So do you know what is the default on Mac? Is F11 assigned to something on Mac by default? If it is, then we should
change our default. If it's not, then I agree we can not do much about this.
Comment 6 Milan Kubec 2007-06-19 08:43:13 UTC
F11 is assigned to Dashboard & Expose command by default on Macs so IDE won't receive that key. IMO it's impossible to
come up with set of shortcuts that work on all platforms. There are e.g. other shortcuts that are stolen by linux window
managers. I think that solution is this case is remap Dashboard command in Macs System Preferences to something else and
then IDE will Build Main Project on F11.
Comment 7 Jesse Glick 2007-06-19 20:55:36 UTC
We already have a module which contains Mac-specific key bindings, so why don't we just provide a different binding for
Build Main Project on Macs?
Comment 8 Milan Kubec 2007-06-20 08:26:19 UTC
OK, such Mac-specific shorcut will be?

No more P2 IMO.
Comment 9 Petr Jiricka 2007-06-21 16:27:13 UTC
I agree with Jesse's proposed solution and with decreasing the priority to P3. 

Please also find a new shortcut for F9 (Compile single file), which is also assigned to a system action on Mac. Thanks.
Comment 10 Milan Kubec 2007-06-22 13:27:54 UTC
Reassign back to me when resolved. Thanks.
Comment 11 Ondrej Langr 2007-10-17 13:31:47 UTC
This problem is caused by mac consuming F9-F12 and Shift + F9-12 keys in OOTB settings.

Conflicts are:
   F9  - Compile selected package or file
   F11 - Build Main Project
   Shift + F9  - Toggle profiling point
   Shift + F11 - Clean & Build Main Project

Suggested solution is:
   Alt + F9  - Compile selected package or file
   Alt + F11 - Build Main Project
   Alt + Shift + F9 - Toggle profiling point
   Alt + Shift + F11 - Clean & Build Main Project
All abovementioned shortcuts should be applicable only on mac computers, their PC versions should remain untouched.

There should be no conflicts with other actions as there is no pc-modifier key to be tranlated to Alt on macs. 
Comment 12 Petr Jiricka 2007-10-17 14:52:46 UTC
Thanks, Ondro! BTW, this is really annoying, I am adding the fix-in-60 marker.
Comment 13 Milan Kubec 2007-10-18 08:53:20 UTC
olangr, please see which describes a way how to map
shortcuts on Mac. It seems that shortcuts recommended by you are in contradiction with the wiki topic. Thanks for
Comment 14 Ondrej Langr 2007-10-18 10:09:37 UTC
Do you mean following rule?:

There should be no Alt-bound keyboard shortcuts on the mac ever - it is used on international keyboards as the compose
key (for a long time, we didn't know it, but Norwegian and French users could not type } or { in NetBeans - kind of
limits the usefuless of a Java IDE).

I am aware of the shortcomings of Alt shortcuts on mac (and also on PC, we don't use them there due to mnemonics). It
actually applies only to Alt + Character shortcuts, Alt + F-key shortcuts are not a problem. To be absolutely sure I
tested all norwegian extended, french, german, chinese and chinese simplified. With all these keyboard layouts, all
proposed shortcuts are fine on mac computer with MAC OS X 10.4.1.
Comment 15 Milan Kubec 2007-10-29 10:17:41 UTC
The problem with this issue is that module system doesn't allow to load modules in particular order except module
dependency which cannot be used in this case. Solution is to load module that will fix all those shortcuts on Mac as
last one but that's not possible currently without setting dependency, but it cannot be used because disabling some
module would possibly remove fixed shortcuts for other active module.
Comment 16 Jesse Glick 2007-10-29 20:19:40 UTC
What is the significance of module load order in this case? Can it be made irrelevant by permitting a keybinding to
consist of a folder rather than single file, with the first non-null instance gotten from a file in that folder (in
layer-specified order) being used for the binding?
Comment 17 Jaroslav Tulach 2007-10-30 09:40:36 UTC
Jesse, does your comment assume that issue 15926 is implemented? However it is not and it will unlikely be for 6.0...
Comment 18 Jesse Glick 2007-10-30 12:25:49 UTC
Yes, I had forgotten I had filed that! It sounds like issue #15926 would be helpful in this case, if I understand the
problem correctly.
Comment 19 Ondrej Langr 2007-10-30 13:50:20 UTC
Can't this be done where other mac keybinding modifications are implemented? I don't know where and how, but this
problem must have already been solved e.g. for following actions/keys:
   find next - F3 (PC),   Cmd + G (Mac)
   replace   - Ctrl + H,  Cmd + R (Mac)
   .. and also for this issue:
Comment 20 _ tboudreau 2007-10-31 07:26:30 UTC
Editor shortcuts are registered completely differently than menu shortcuts, and IIRC AppleMenu does depend on the editor (or at least used to), so it is easy 
for it to be loaded after the editor and override things.
Comment 21 Milan Kubec 2007-10-31 08:48:27 UTC
OK, but we are talking about menu shortcuts.
Comment 22 Stanislav Aubrecht 2008-03-27 16:18:19 UTC
i've fixed the following actions: 
F9  - Compile selected package or file
F11 - Build Main Project
Shift + F11 - Clean & Build Main Project
Comment 23 Stanislav Aubrecht 2008-03-27 16:20:18 UTC
reassigning to profiler team to fix their own action. it should be possible to use the same technique (see my changeset)
Comment 24 Stanislav Aubrecht 2008-04-03 12:35:28 UTC
this fix caused regression #131845 so i've reverted it
Comment 25 Jiri Sedlacek 2008-04-03 15:32:06 UTC
Profiler shortcut problem already tracked by Issue 114365. Reassigning back to original owner.
Comment 26 Milos Kleint 2008-04-03 17:22:24 UTC
milane, you have been working on this, reassigning.
Comment 27 Jesse Glick 2008-04-03 19:22:37 UTC
Using originalFile="" is senseless. I guess the correct fix should have been to inject a dynamic layer into the SFS
which computes the correct shortcut name on the fly.

More generally, I would suggest creating a platform module which looks for subtrees in the SFS named e.g. Mac/ or Unix/
or Linux/ or Windows/ or whatever (see e.g. org.openide.modules.* tokens and Utilities.OS_* constants), maybe also
NotMac/ etc., maybe all under some folder such as OS/, and automatically merges their contents into the SFS (shifted up
to root) when running on that OS. Therefore the defaults module could simply have:

<folder name="OS">
  <folder name="NotMac">
    <folder name="Keymaps">
      <folder name="NetBeans">
        <file name="F11.shadow">
          <attr name="originalFile"
  <folder name="Mac">
    <folder name="Keymaps">
      <folder name="NetBeans">
        <file name="A-F11.shadow">
          <attr name="originalFile"

This could be useful for various purposes, I think. We already have messy stuff to exclude e.g. File > Exit on Macs,
which could be simplified and made more declarative this way. Would be API_REVIEW_FAST.
Comment 28 Lukas Hasik 2008-04-10 21:41:08 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 29 Tomas Danek 2008-09-09 15:06:32 UTC
still planed for 6.5?
Comment 30 Milan Kubec 2008-09-09 15:09:38 UTC
If there is a time ...
Comment 31 Ondrej Langr 2009-10-19 15:09:01 UTC
*** Issue 173952 has been marked as a duplicate of this issue. ***
Comment 32 Jesse Glick 2010-04-02 17:57:29 UTC
Without a Mac I can neither confirm nor fix.
Comment 33 Jesse Glick 2011-07-21 13:10:38 UTC
Comment #27 would perhaps be made possible by a fix of bug #198508. But anyway the obvious fix, defining shortcuts in the defaults module, should be easy now; comment #15 is obsolete as of the fix of bug #141925. Please reevaluate.
Comment 34 Stanislav Aubrecht 2014-04-11 08:41:46 UTC
Not sure if this issue is still valid. If so, please reopen, thanks.