Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to create a keyboard shortcut to i.e. open Firefox while I am working in another application. I know I can use ⌘ CMD+T when I am in Firefox to open a new tab.

I haven't found a way to create that kind of shortcuts in System Preferences.

Any ideas?

share|improve this question
So you mean keyboard shortcuts? – Rabarberski Aug 5 '11 at 13:24
Look at the Services on the Application menu any reasonably written Cocoa app will have these and they can be assigned keys. Unfortunately I think Firefox is not written to use these. Safari can be used here – Mark Mar 19 '13 at 12:02
This may not have been an option in 2011 when the question was first asked, but it's now pretty easy to do using Automator. See… for a tutorial. – Edward Falk May 4 at 18:59
up vote 26 down vote accepted

Karabiner (previously known as KeyRemap4MacBook)

Save a file like this as private.xml:

<?xml version="1.0"?>
    <autogen>__KeyToKey__ KeyCode::F11, KeyCode::VK_OPEN_URL_Safari</autogen>

    <!-- change the right option into an extra modifier key -->
    <autogen>__KeyToKey__ KeyCode::OPTION_R, KeyCode::VK_MODIFIER_EXTRA1</autogen>
    <autogen>__KeyToKey__ KeyCode::I, ModifierFlag::EXTRA1, KeyCode::VK_OPEN_URL_iTunes</autogen>

    <!-- make a short press of the right command open Emacs -->
    <autogen>__KeyOverlaidModifier__ KeyCode::COMMAND_R, KeyCode::COMMAND_R, KeyCode::VK_OPEN_URL_EMACS</autogen>

Note that the <url> field uses file URI's so, for example, any spaces in the path or filename should be encoded with %20.

Alfred 2

If you have the Powerpack for Alfred 2, you can create a workflow like this:

Hotkeys have a short delay by default, but you can reduce it by changing the trigger behavior:

Other applications that support assigning shortcuts to opening applications

Automator services

There has been a bug since 10.7 where the keyboard shortcuts for Automator services don't always work until you hover over the services menu from the menu bar. There is also a relatively long delay before services are run, and the keyboard shortcuts for services don't work when the frontmost application doesn't have a services menu.

share|improve this answer
private.xml WHERE? Anywhere? Does it already exist? I can't find it. Where does it go? – boulder_ruby Jul 2 '14 at 19:21


Alfred, in its Power Pack version, can map shortcuts to applications, among many other features.

share|improve this answer

If you do not want to use third party apps.
Then you can use Automator (Services ), and the Built in keyboard shortcuts.

Here is how in an answer to a similar question.

Very simple.

In Step 3, of creating the service.
Set it to 'any application' .

set Service receives to: 'no input' in 'any application' (Do this by using the drop downs at the top.)

share|improve this answer
Be nice to know why there is a down vote on this. Not commenting on down votes is not helpful to anyone – markhunte Apr 15 '13 at 16:39

Get Quicksilver,, it will allow you to set keyboard shortcuts to open apps. There are actually more many more apps that do this (Alfred, Keyboard Maestro etc etc.)

Mac OS X actually has a built-in way of doing that, but it doesn't work for Firefox, because it doesn't support services!

Update Jan 2012: Blacktree no longer updates Quicksilver--the developer went to Google and has released Google Quick Search Box. Quicksilver lives on, but it has a new home at

share|improve this answer
Thanks. Was very helpful to me. used Google but didn't find your link. – politicus Aug 4 '11 at 7:41
Cool, so you came right? – Paul Eccles Aug 4 '11 at 11:02
"Yes". Installed Quicksilver (very powerful, certainly better than having just a shortcut). Tried Keyboard Maestro. Now having a rest before learning all these shortcuts ;-) – politicus Aug 4 '11 at 13:41
Quicksilver is great. Thanks so much for the advice. I created a bash script to open gmail and another to open mysms in the browser. Then I used the appify script to make them OS X apps. From there I could use Quicksilver to have my keyboard shortcuts to launch those. Very nice to have. – jbrock Jan 31 '15 at 21:39

I know Alfred has already been mentioned, but I thought I'd say a little bit about choosing shortcut keys. It was not obvious to me at first what would be a good set of shortcuts that was (a) easy to remember, (b) easy to use, and (c) did not conflict with other system or application shortcut keys.

I ended up using the "alt" key as the basis, and generally relying on keys that can be triggered by the left hand, and choosing descriptive letters (e.g., x for Excel). this allows you to have the mouse in the right hand and the shortcut keys triggered with the left.

Another benefit of using Alfred Hotkeys to activate an application is that if an application is hidden, it will be unhidden.

Here's a screen shot of how I have it configured: example alfred hotkey configuration

share|improve this answer

There are plenty of good options here but I wanted to add my personal favorite which I've been using since 10.5 and still works on 10.11.2: Spark 3.

It's freeware and extremely easy to set up. Here's the developer's description:

Spark is a powerful, and easy Shortcuts manager. With Spark you can create Hot Keys to launch applications and documents, execute AppleScript, control iTunes, and more... You can also export and import your Hot Keys library, or save it in HTML format to print it. Spark is free, so use it without moderation!

Here's a screenshot of the interface:

Spark User Interface

share|improve this answer

Your Answer


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.