I want to be able to open a new terminal window in OSX Mavericks by using a keyboard shortcut. The terminal window should be:

  • New (I don't want an existing one to be focused)
  • Opened on the desktop I'm on at the time
  • In focus

Any idea how to do this?

  • What Operating system? which interface used? gnome, xfce, etc.. more information. =] – stderr Mar 2 '14 at 22:53
  • 1
    I posted the question on the wrong site... thought I was on AskDifferent. Anyway, OSX Mavericks – zoran119 Mar 2 '14 at 22:57
  • I take it Cmd+N doesn't work for you? Or did you want to have a global shortcut? – Ben Companjen Mar 2 '14 at 23:27
  • Yep, global shortcut (no matter what I'm looking at I want the shortcut to open a new terminal). – zoran119 Mar 2 '14 at 23:29

You can assign a shortcut to a script like this:

tell application "Terminal"
    do script ""
end tell

do script "" opens a new window and activate makes Terminal frontmost.

If you have bought the Powerpack for Alfred, you can assign a shortcut to a script by connecting a hotkey trigger to a run script action:

enter image description here


I'm not in front of my Mac right now, but I believe that you can trigger a particular action inside of any application by using the following steps, from Apple's support site:

Choose Apple menu > System Preferences, and then click Keyboard.

Click Keyboard Shortcuts, and then click the Add (+) button.

Choose an application from the Application pop-up menu. If you want to set the same key combination for a menu command that appears in many applications, choose All Applications.

If the application you want to select does not appear in the list, choose Other and locate the application using the Open dialog. Some applications may not allow you to set keyboard shortcuts.

Type the menu command for which you want to set a keyboard shortcut in the Menu Title field.

You must type the command exactly as it appears in the application menu, including ellipses and any other punctuation. An ellipsis is a special character that looks like three periods. To type an ellipsis, press Option-semicolon, or use the Character Viewer. It may be difficult to know whether the command is written in the menu with a real ellipsis or with three periods, so if one does not work, try the other.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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