Creating System-Wide Keyboard Shortcut To Launch Applications [duplicate]
I recently switched from Ubuntu, and I was feeling very comfortable with using Ctrl + Alt + T
to launch terminal. Can I assign Shift + Cmd + T
to do the same thing in Yosemite? Specifically, I want a new terminal window to be opened.
Solution 1:
Most system events can be directly handled and manipulated with Automator. Automator is highly resourceful, yet not taken advantage of. I'll walk you through the steps to creating a system wide keyboard shortcut for opening any application, but in your case, Terminal.
Step 1 : Open Automator [located in Applications > Automator]
Step 2 : Create a New Service for your 'Document Type'
Step 3 : Before moving forward with anything else, ensure you change the input methods in the top right sidebar to where it is now capable of running without any input in a specific application. Emulate the following picture:
Step 4 : Click on the Library tab 'Utilities' > Drag and Drop the 'Launch Application' into your workflow. Select your Application, in your case, you will have to manually find it by selecting 'other'. Your screen should now resemble mine:
Step 5 : Save your Service to whatever name you want, for this instance, I went ahead and saved mine as Launch Terminal, you'll see why this is important in a minute.
Step 6 : Navigate to your System Preferences > Keyboard > 'Shortcuts' tab.
Step 7 : Click on the 'Services' tab in the left side bar and all your services will populate. Navigate to the 'General' section, and since it's a newly created service, it will automatically be turned on by default. Here is where you can set your keyboard shortcut. [THERE WILL NOT BE ONE BY DEFAULT]
Step 8 : Close your System Preferences after you set the shortcut and test it out! Voila! Magnifico!
There are some things to consider when selecting your shortcut:
-
SHIFT+CMD+T is a widely used variable. The shortcut you set shouldn't be a keyboard shortcut used elsewhere. Since we didn't specify an input or specific application, this shortcut can be used system wide. However if an app already is hard coded to use this keyboard shortcut, yours will be overrided. Safari has the same short cut, so the Application will override your service keyboard shortcut. So use a pattern of keys not used elsewhere.
For safety I used : SHIFT+CONTROL+OPTION+CMD+T as no other applications really use that. You can use whatever you want, I just wanted to clear that up before people commented. - Why is saving the name appropriately important?
Services populate according to the types of files you select in finder in the right click contextual menu. So for example: you select a finder menu item that is a picture and you have a service set to resize those photos, the contextual menu will populate that service in there :
As you can see the service populates in your contextual menu, that doesn't matter now since you didn't specify input or an application when creating the workflow in Yosemite, but you don't know how this will effect future OS releases.
Solution 2:
Another option is to use the free menubar app Apptivate. I use it hundreds of times/day.
Description from the site:
Use global hotkeys or the Apptivate interface to: Launch, hide and quick peek applications; Execute scripts; Run Automator workflows; Instant access to files and folders; Hotkey sequences
What I love about Apptivate:
- Not only launches an app (or folder, script, doc) via global hotkey (if it isn't currently running), but the same hotkey also brings the app's window(s) to the foreground if already running and hides them if the app currently has the focus.
- Easily create/change/find hotkeys from the menubar drop-down
- The quick peek feature is great for quickly referencing something in one app while working in another.