Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Say an application has a menu selection Export in the File menu. On mouse over, a sub-menu extends with the export options. Is there a way to make a keyboard shortcut for one of those nested selections?

I've already tried implementing the keyboard shortcut for Export, setting it to Command-E. However, this doesn't work, even though the Command symbol shows up next to Export.

Any help is appreciated

share|improve this question
    
A similar question at Super User –  Lri Jul 31 '12 at 5:08

3 Answers 3

up vote 4 down vote accepted

On Mountain Lion you can assign keyboard shortcuts to nested menu items using the following format:

File->Export->Sub-item

I found the answer in this post on the Apple Support Communities by the user macNtouch.

share|improve this answer

If you want to assign a shortcut to the submenu you can just use the name of the submenu as it appears. So if I wanted to assign a shortcut to the default encoding in Safari, using "Default" is enough.

If however you want to assign a shortcut to a submenu that occurs multiple times, such as "My Folder" you can use: >Move To>Notes, in Lion at least. This no longer works in Lion.

You could also try to assign a shortcut using apple script like this:

tell app "System Events" to tell process "Terminal"
click menu bar 1's menu "Shell"'s menu item 1's menu "New Window"'s menu item "Pro" end tell

and then use these steps to generate an automator action:

  1. Open Automator and choose the Service template
  2. Add a Run Shell Script or Run AppleScript action
  3. Check that the values for accepted data types and application scope the are correct
  4. Paste the script and save
  5. Assign a shortcut in the Keyboard preference pane

If the shortcut for a service doesn't work at first, try running the service once by selecting it in the Services menu.

Credit for the automator answer goes to Lori,

share|improve this answer
1  
Specifying the menu titles like >File>Duplicate no longer seems to work on 10.8. –  Lri Jul 31 '12 at 5:17

Use "->"

Answered by MacNTouch at https://discussions.apple.com/message/20380162#20380162

share|improve this answer
    
What is the point of posting the exact same thing as Johan Kaving but a day later. –  Tom Gewecke Jan 22 '13 at 20:58

Your Answer

 
discard

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.