Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Globally edit all keyboard shortcut settings System
There seem to be a lot of rules about what keys combinations you can and cannot edit in the Keyboard preference pane. Apple has definitely forbidden the creation of simple command-key shortcuts, for instance. Also, there are other limitations out there about replacing existing shortcuts as well. There is a simple way around these limitations however. Open up the file ~/Library -> Preferences -> .GlobalPreferences.plist with Property List Editor. Fnd and open up the NSUserKeyEquivalents key. Edit away as many keyboard shorcuts as you like, without Apple sitting on your shoulder and telling you which you can and cannot use. You'll need to know the modifier symbols:
  • Command is @
  • Shift is $
  • Control is ^
  • Option is ~
Additional info available in this older hint.

What I have used this hint for is to stop my browsers from quitting on command-Q (they are now all set to command-control-Q), as I use command-tab to flip between my HTML editor and browsers all day long, and had grown tired of accidentally hitting command-Q and losing all my open files or web pages.

You do have to replace the command-Q shortcut on an application-by-application basis, but it doesn't take long to duplicate the command and paste.

You can create dummy keys for each application in the GUI Keyboard Preference pane which makes the Property List Edit go faster.

There's no need to work on each application's own plist files; all menus are fixable in globalpreferences.plist (I had some trouble with Adobe applications, though). Don't forget to quit and relaunch applications to see their new keyboard commands show up (visible in the menu).

[robg adds: This is discussed, in less detail, in this previous hint.]

    •    
  • Currently 2.60 / 5
  You rated: 4 / 5 (5 votes cast)
 
[10,226 views]  

Globally edit all keyboard shortcut settings | 7 comments | Create New Account
Click here to return to the 'Globally edit all keyboard shortcut settings' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Globally edit all keyboard shortcut settings
Authored by: rbriber on Mar 30, '04 09:05:59AM

OK, what I'd really like is to have the Finder use Apple-N for new folder rather than Shift-Apple-N. It seems like this hint provides the directions for doing this but;

1.) How do I open .GlobalPreferences.plist? It's an invisible file and doesn't show up in the Open File dialog box for Property List Editor; nor does it show up in the Finder window for ~/Library/Preferences.

2.) I looked inside .GlobalPreferences.plist by copying the file via the command line to GlobalPreferences.plist (not invisible anymore). I figured I could copy it back after editing the appropriate value, but my file has no NSUserKeyEquivalents key. What gives with this?

I am confused, but would be happy with more explicit instructions to accomplish my original goal or alternatively more explicit general help.

Thanks,
Rob



[ Reply to This | # ]
Globally edit all keyboard shortcut settings
Authored by: modesto on Mar 30, '04 05:33:28PM

Typing the following sequence into the terminal did the job for me:

[code]
defaults write .GlobalPreferences NSUserKeyEquivalents '{\"New Finder Window\"=\"@$N\";\"New Folder\"=\"@N\";}'
[/code]

I'm not sure whether the developer tools have to be installed for this to work. In any case, they are installed on my machine.



[ Reply to This | # ]
Globally edit all keyboard shortcut settings
Authored by: modesto on Mar 30, '04 05:36:25PM

oh, and while it may be obvious, I still should have mentioned it: you need to log out before the changes take effect.



[ Reply to This | # ]
Globally edit all keyboard shortcut settings
Authored by: godo on Mar 31, '04 05:33:24AM
2.) I looked inside .GlobalPreferences.plist ..., but my file has no NSUserKeyEquivalents key. What gives with this?
You haven't set any system-wide keyboard shortcuts yet. Go into the Keyboard Preference Pane and make some shortcut under "All Applications". It will show up in the .GlobalPreferences.plist and give you a model to work from.
1.) How do I open .GlobalPreferences.plist? It's an invisible file...
Use TinkerTool to "Show hidden and system files." Then relaunch Finder. Double-clicking on .GlobalPreferences.plist should now open it in Property List Editor. One tip about using the Property List Editor: I found that I had to double click on bits so that it would let me edit them.

By the way, this was a great hint as I can now make certain nuisance applications obey the Command-H keystroke.

Anybody know how to make Command-` cause BBEdit Lite to rotate windows? It seems to hold on to it pretty tightly for "Exchange Characters".

[ Reply to This | # ]

You answered your own question
Authored by: TvE on Mar 31, '04 06:16:09AM
1.) How do I open .GlobalPreferences.plist? It's an invisible file...

If you cd to that directory ("cd ~/Library/Preferences/) in the terminal and type the command you just - unknowingly - typed "open .GlobalPreferences.plist" then the file opens in the relevant application - so there is no need to tamper with TinkerTools or such app's :)

Or you could be advanced and combine the two commands to: "open ~/Library/Preferences/.GlobalPreferences.plist"

PS.: You can also use the Go command if your problem was to go to an invisible folder in the Finder...

[ Reply to This | # ]
You answered your own question
Authored by: bluehz on Mar 31, '04 01:30:58PM

I edited my com.apple.Safari.plist and added equiv for cmd+shift+Q to Quit...

<key>NSUserKeyEquivalents</key>
<dict>
<key>Quit</key>
<string>@$Q</string>
</dict>

Why does it not show up or respond after restarting Safari?



[ Reply to This | # ]
You answered your own question
Authored by: Kino on Apr 10, '04 01:34:09AM

- It should be Quit Safari and not Quit.

- Make sure that your shortcut will not conflict with any other shortcut which is active. Command-shift-q is already taken: Log Out.



[ Reply to This | # ]