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 79879

Summary: Eclipse keybindings broken on Mac OS
Product: editor Reporter: _ tboudreau <tboudreau>
Component: OptionsAssignee: issues@editor <issues>
Status: RESOLVED FIXED    
Severity: blocker CC: jjancura, jonathanlocke, msauer
Priority: P2 Keywords: RELNOTE
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description _ tboudreau 2006-07-09 09:18:39 UTC
Compare the Eclipse keybindings on Mac OS with actually running Eclipse on Mac 
OS.  Eclipse on Mac OS does the same thing we do on Mac OS - bind most Ctrl-
based shortcuts to Command [META].  For example, Command-Z is undo on Eclipse 
on Mac OS, but Ctrl-Z is our binding for undo on Mac OS.  Which means that on 
Mac OS, we don't actually have Eclipse keybindings - they won't match the 
habits of an Eclipse user.

This can be solved very simply, assuming you're defining the keybindings the 
standard way using Utilities.stringToKey()/keyToString() - just define the 
bindings using D- for Ctrl bindings and they'll automagically be bound to 
Command on mac;  use O- for Alt keybindings and they'll be bound to Alt on 
PC's and Ctrl on macs.  E.g.

CS-O == Ctrl-Alt-O everywhere
DS-O == Ctrl-Alt-O on PC's and Command-Alt-O on macs

AS-O == Alt-Shift-O everywhere
OS-O == Alt-Shift-O on PC's and Ctrl-Shift-O on macs

(remember Alt is not usable as an accelerator on macs)
Comment 1 Jan Jancura 2006-08-11 12:45:58 UTC
fixed in trunk:


IDE:-------------------------------------------------
IDE: [8/11/06 1:45 PM] Committing "Eclipse-keybindings.xml" started
Checking in Eclipse-keybindings.xml;
/cvs/ide/defaults/src/org/netbeans/modules/defaults/Eclipse-keybindings.xml,v 
<--  Eclipse-keybindings.xml
new revision: 1.12; previous revision: 1.11
done
IDE: [8/11/06 1:45 PM] Committing "Eclipse-keybindings.xml" finished