Index: editor/libsrc/org/netbeans/editor/SettingsDefaults.java =================================================================== RCS file: /cvs/editor/libsrc/org/netbeans/editor/SettingsDefaults.java,v retrieving revision 1.33 diff -u -u -r1.33 SettingsDefaults.java --- editor/libsrc/org/netbeans/editor/SettingsDefaults.java 25 May 2004 13:29:08 -0000 1.33 +++ editor/libsrc/org/netbeans/editor/SettingsDefaults.java 31 Jul 2004 15:29:00 -0000 @@ -191,6 +191,16 @@ SettingsNames.STATUS_BAR_BOLD_COLORING }; + + private static final int FIND_NEXT_KEY = + System.getProperty("mrj.version") == null ? + KeyEvent.VK_F3 : KeyEvent.VK_G; + + private static final int FIND_NEXT_MASK = + System.getProperty("mrj.version") == null ? + 0 : KeyEvent.META_DOWN_MASK; + + public static final MultiKeyBinding[] defaultKeyBindings = new MultiKeyBinding[] { new MultiKeyBinding( @@ -455,15 +465,15 @@ BaseKit.gotoNextBookmarkAction ), new MultiKeyBinding( - KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0), + KeyStroke.getKeyStroke(FIND_NEXT_KEY, FIND_NEXT_MASK), BaseKit.findNextAction ), new MultiKeyBinding( - KeyStroke.getKeyStroke(KeyEvent.VK_F3, InputEvent.SHIFT_MASK), + KeyStroke.getKeyStroke(FIND_NEXT_KEY, FIND_NEXT_MASK | InputEvent.SHIFT_MASK), BaseKit.findPreviousAction ), new MultiKeyBinding( - KeyStroke.getKeyStroke(KeyEvent.VK_F3, InputEvent.CTRL_MASK), + KeyStroke.getKeyStroke(FIND_NEXT_KEY, InputEvent.CTRL_MASK), BaseKit.findSelectionAction ), new MultiKeyBinding( Index: editor/libsrc/org/netbeans/editor/ext/ExtSettingsDefaults.java =================================================================== RCS file: /cvs/editor/libsrc/org/netbeans/editor/ext/ExtSettingsDefaults.java,v retrieving revision 1.33 diff -u -u -r1.33 ExtSettingsDefaults.java --- editor/libsrc/org/netbeans/editor/ext/ExtSettingsDefaults.java 25 May 2004 13:29:09 -0000 1.33 +++ editor/libsrc/org/netbeans/editor/ext/ExtSettingsDefaults.java 31 Jul 2004 15:29:00 -0000 @@ -72,11 +72,23 @@ public static final Integer defaultJavaDocAutoPopupDelay = new Integer(200); public static final Dimension defaultJavaDocPreferredSize = new Dimension(500, 300); public static final Boolean defaultJavaDocAutoPopup = Boolean.TRUE; + + /** + * Issue 46808 - Keybinding for find next should be Command-G on mac. + * Core remaps GotoAction to ALT-G on mac; it is remapped here for + * consistency, and Goto Declaration is moved to Alt-Shift-G, since + * it is in the way. + */ + private static final int GOTO_KEYMASK = System.getProperty("mrj.version") == null ? //NOI18N + InputEvent.CTRL_MASK : InputEvent.ALT_MASK; + private static final int GOTO_DECL_KEYMASK = System.getProperty("mrj.version") == null ? //NOI18N + InputEvent.ALT_MASK : (InputEvent.SHIFT_MASK | InputEvent.ALT_MASK); + public static final MultiKeyBinding[] defaultExtKeyBindings = new MultiKeyBinding[] { new MultiKeyBinding( - KeyStroke.getKeyStroke(KeyEvent.VK_G, InputEvent.ALT_MASK), + KeyStroke.getKeyStroke(KeyEvent.VK_G, GOTO_DECL_KEYMASK), ExtKit.gotoDeclarationAction ), new MultiKeyBinding( @@ -92,7 +104,7 @@ ExtKit.replaceAction ), new MultiKeyBinding( - KeyStroke.getKeyStroke(KeyEvent.VK_G, InputEvent.CTRL_MASK), + KeyStroke.getKeyStroke(KeyEvent.VK_G, GOTO_KEYMASK), ExtKit.gotoAction ), new MultiKeyBinding( Index: core/ui/src/org/netbeans/core/ui/resources/layer.xml =================================================================== RCS file: /cvs/core/ui/src/org/netbeans/core/ui/resources/layer.xml,v retrieving revision 1.70 diff -u -u -r1.70 layer.xml --- core/ui/src/org/netbeans/core/ui/resources/layer.xml 31 Jul 2004 14:26:51 -0000 1.70 +++ core/ui/src/org/netbeans/core/ui/resources/layer.xml 31 Jul 2004 15:29:04 -0000 @@ -272,6 +272,16 @@ + + + + + + + +