Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Mac OS 10.6 has a "Keyboard Shortcuts" preference pane in System Preferences. It lets you add new entries, but they don't seem to work. Is this the correct way to add hotkeys? For instance I would like Command+Esc to open Terminal.app.

share|improve this question
    
As Daniel points out, you may want to look at something like Alfred.app or Quicksilver, or Google’s QSB project. –  peelman Feb 14 '11 at 16:06
    
I use and love Alfred, but you can also launch using Spotlight. If you're using Terminal often enough (or at least fewer than other apps starting with "T"), it might be as few as 3 keystrokes -- one to launch spotlight, one to enter "T", one to hit return to accept the first result found. –  Doug Harris Feb 14 '11 at 16:28
    
No need to repeat someone else's suggestion guys. Please leave comments for new information. I like alfred too, but I'm not asking about launchers. –  Ross Charette Feb 15 '11 at 17:51

2 Answers 2

up vote 14 down vote accepted

You have to deal with two issues here

  • You can only assign keyboard shortcuts to applications' menu items and services. Terminal.app is neither.
  • You cannot usually create a keyboard shortcut using Esc for Services in System Preferences » Keyboard » Keyboard Shortcuts.

Make sure a real application launcher such as Quicksilver, Alfred or LaunchBar wouldn't be the better solution.

For a Terminal, have a look at Visor. It allows you to create a HUD console. If you played Quake, you know how it works.


That being said, you can make this work.

First, create a Service by starting /Applications/Automator.app and select the Service template. Select the Utilities library and double-click Launch Application. Select Other... from the popu-menu and then select /Applications/Utilities/Terminal.app.

Above the Launch Application command, select no input and any application.

Press Command-S to save, and name it Launch Terminal.


Now, Open System Preferences » Keyboard » Keyboard Shortcuts, select Application Shortcuts (not Services!). Click the + button, and select All Applications. As name, type Launch Terminal. Then, select the keyboard shortcut input field and press Command-Esc. Click Add.

Done. Now there's a new menu item in Application Menu » Services named Launch Terminal, with the keyboard shortcut Command-Esc, and selecting it starts Terminal.

enter image description here

share|improve this answer
    
A brillant hack :) –  peelman Feb 14 '11 at 16:07
    
I'm pretty sure Cmd-Esc is used by some applications. Might be connected to the Esc autocompletion. I could be wrong though. –  Daniel Beck Feb 14 '11 at 16:18
    
I so wanted this to work, but the keyboard shortcut still doesn't launch terminal. I can select it from the menu, but that defeats the purpose of having a shortcut. (Daniel, yes front row uses that shortcut by default, which you can disable in the keyboard prefs) –  Ross Charette Feb 15 '11 at 17:47
1  
Rebooted, and this is what I've found. The shortcuts don't work right out of the gate. But if you go to the App menu > services they appear. This seems to 'refresh' or activate the service. After that the shortcuts DO work, but only in that app. Is this what you find as well? –  Ross Charette Feb 15 '11 at 18:21
1  
It does work with another user account, and now it appears to be working with my user account too. I'm baffled. Any idea which launchagent or daemon is responsible? On another note, this method launches apps slower than using a launcher app, not that it's your fault or anything, but the nice thing about shortcuts is the speed. –  Ross Charette Feb 15 '11 at 19:41

There's a bug where the shortcuts for Automator services don't always work until the services menu has been shown once from the menu bar. And they won't be available in applications that don't have a Services menu. There's also a noticeable delay before they are run.

Using a third party application like Alfred would be a better idea.

You could also assign shortcuts to shell commands like open -a iTunes.

This would block the script until the application has finished opening, so it would seem to take longer if it was run with FastScripts:

tell application "iTunes"
    reopen
    activate
end tell
share|improve this answer
    
I interpreted his answer as to not wanting third party software like launchers. So FastScripts, Apptivate etc. were out -- although they admittedly probably work better than my solution. I know about editing the plists, I explored this a while ago with @Arjan's help -- but I think you agree it's not usually possible, and quite easier to do using the named menu items shortcuts option. Btw, welcome to SU, I love your posts. –  Daniel Beck Mar 1 '11 at 5:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.