MacOS hotkey for terminal

18 July, 2017

At the university I've become used to operating in Linux systems, and the distributions I'm using all have a system-wide shortcut to access the terminal, CTRL-ALT-T. Somehow this is not a built in feature and I want it. Google led me to: 

https://stackoverflow.com/questions/35954184/is-there-a-keyboard-shortcut-hotkey-to-open-terminal-in-macos

If the link still exists, follow that. If not, see below.

  1. Create a new Automator service -> Run Applescript

    on run {input, parameters}
    tell application "iTerm"
        if it is running then
            do shell script ""
        end if
        activate
    end tell
    end run
    
  2. Set "Service receives" to "no input" and save the workflow as "New iTerm window".
  3. In the menubar, go to Automator->Services and test whether it works ("New iTerm window" should be an option).
  4. In the menubar, go to Automator->Services->Services Preferences and scroll to the bottom, you can now set a keyboard shortcut to it.

Credit: Many thanks to Rob Mayoff on StackOverflow.