How to make global hotkey for new mail message (keeping mail hidden)?

Discussion in 'macOS' started by ZestyOne, Dec 20, 2010.

  1. ZestyOne macrumors regular


    Oct 18, 2009
    I see there are a few apps such as cockpit and keyboard maestro that handle global hotkeys, however I would like to figure out a free solution. I have quicksilver but the mail plugin hardly cuts it for effectiveness and functionality.

    Basically I'd like to just have a hotkey (any available function keys after F12 for instance), that when I push it, it opens up a "New Mail" message for OSX Mail, without having to go to mail, hitting new, typing out message then hiding mail (it pops up along with new mail).

    I do a lot of programming and design and it would be great to do this as I send out like 50 emails a day ( :eek:!!)

  2. swiftaw macrumors 603


    Jan 31, 2005
    Omaha, NE, USA
    Just tried this and it's relatively simple.

    Step 1: Create a service in Automator
    a) Open Automator
    b) Select Service template
    c) On the right hand side, use the pull down menus to make it say "Services receives no input in any application.
    d) From the left hand panel select Mail, then drag "New Mail Message" to the right hand panel.
    e) Save, give it a name like "New Mail Message"

    Step 2: Create a keyboard shortcut
    a) Open System Preferences
    b) Select Keyboard
    c) Select Keyboard Shortcut
    d) Select Services
    e) Find "New Mail Message" in the list, add keyboard shortcut (I used Shift+Apple+M) by clicking to the right of the name.

    Step 3: Check that it works. (You can also launch it by clicking on AppName->Services->New Mail Message in the menu bar of any App.
    Note, if Mail isn't running, Mail will launch and then create a New Message.
  3. ZestyOne thread starter macrumors regular


    Oct 18, 2009
    Thanks, that was extremely helpful :cool:
  4. ZestyOne thread starter macrumors regular


    Oct 18, 2009
    One minor tweak, is there a way I can use applescript to hide the application for mail (the inbox) without hiding the actual New Mail window that I just popped up?

    I tried googling applescript but this hides the entire mail app, including the new mail window.

    on run {input, parameters}
    	tell application "System Events"
    		set visible of process "Mail" to false
    	end tell
    	return input
    end run
  5. mrk2010 macrumors newbie

    Dec 27, 2010
    I know this is an old thread and you probably figured out a solution, but for the benefit of all the readers out there, you can just simply minimize the message viewer window. As a result, the message viewer will not pop up every time you use the shortcut to compose a new message.

    If you want to easily bring the message viewer back up again, you can set up a shortcut:
    1) Go back to the Keyboard Shortcuts window in System Preferences (as described above)
    2) Click on Application Shortcuts in the pane on the left, and then click on the + to add a new shortcut
    3) Under the Application: drop down menu, select Type "Message Viewer" (without quotes) in the Menu Title: field, and press a keyboard shortcut. I used Apple+Shift+V. Click Add.

    Now, whenever you task switch to Mail, the message viewer won't show up because it was minimized instead of hidden. Simply press your keyboard shortcut to bring it back up quickly.

    Hope this helps!
  6. jt6572 macrumors newbie

    Aug 5, 2011
    Perth West Australia
    thank you!

    wow, exactly what i was looking for!

    thanks very much :)

Share This Page

5 December 20, 2010