Need some Help? Have a tip to share?

Email me at MacTipper@gmail.com, or, leave a comment!

Learn How to Win Free Stuff Online


3/18/08

Add Keyboard Shortcuts for Applications

Update: You do not need to use the command line to achieve this effect!
Simply make a keyboard shortcut through the GUI with the name of the application as you see it in the menu.
Sorry for any confusion this may have incurred.


I've mentioned the application Spark before as a way of launching an application through a keyboard shortcut. What I didn't know is that you don't need a 3rd party application to do that. As it turns out, you can easily do this with keyboard shortcuts through the command line.

What you need to do is go to the Recent Items submenu in the  menu. Find the exact name of the application you want to launch with a keyboard shortcut. Then, use this template terminal command to make the terminal code you'll enter in:

defaults write NSGlobalDomain NSUserKeyEquivalents '{"App_name"="keyboard_shortcut";}'

Replace the App_name with the name you got from the  menu. Replace the keyboard_shortcut with the keyboard shortcut you want. Here's the equivalents:

@ = Cmd
~ = Option
^ = Ctrl
$ = Shift

So, to add Cmd-Option-Shift-M to launch Mail.app, I would use:

defaults write NSGlobalDomain NSUserKeyEquivalents '{"Mail.app"="@~$m";}'

As a final note, if you don't use the recent items menu for anything, then you can go to the Appearance preference pane and change the number of items to 50. This way, the app is practically guaranteed to be in the list.

0 comments:

Post a Comment

Subscribe Via Email!

Enter your email address:

Delivered by FeedBurner