Make Keyboard Shortcuts for Two Menu Items with the Same Name

OS X has an easy way to add keyboard shortcuts: in System Preferences.app go to the “Keyboard” preference pane, click on “Shortcuts” and then “App Shortcuts”. You can create a “global” keyboard shortcut (which will work in any application which has a matching menu item), or you can create an app specific shortcut which will only work in one particular application.

That’s great, but what happens if an application has two menu items with the same name? How can you tell which menu item will be used for the keyboard shortcut? Turns out there’s an easy way to do this, but one that I had never heard of, and I’m guessing others might not have known it either. I’m going to use 1Password as an example, but this will work in any OS X app.

I have been using 1Password’s “Vaults” feature and created two vaults: one called “Archive” for things I don’t use all that often, and another called “Mom” for passwords, etc. that I keep for my mom.

If I am in my primary 1Password vault and want to move something to one of the other vaults, here is the menu item if I want to move something to the “Archive” vault:

And here is the menu item if I want to move something to the “Mom” vault:

If I wanted to create a keyboard shortcut for 1Password in OS X’s System Preferences, this is what I would usually do:

But the problem with that is obvious: Does “Move” refer to Item » Share » Mom » Move or to Item » Share » Archive » Move?

Jamie Phelps linked to this tip on the awesome-but-sadly-now-defunct “Mac OS X Hints” site which explains that you can specify the exact menu item by using a -> to indicate the exact menu item that you mean.

That means that given the two menus in my example, I would use “Item->Share->Archive->Move” and “Item->Share->Mom->Move” as shown here:

Now if I look at those two menu items again, I see that they each have the keyboard shortcut that I assigned to them:

⌘ + ⇧ + A for “Archive”:

⌘ + ⇧ + B for “Mom”:

Bonus Keyboard Shortcut Tips

Do you use the “Save as PDF…” feature in the standard OS X print menu? I bet many people don’t even know it exists, but it’s a really handy feature, and it gets even better if you use the great “Save as PDF…” tip from David Sparks. He even made a screencast to show you how to do it.

Do you miss the “Save As…” menu item (which was replaced with the Really Not The Same Thing “Duplicate” menu item in Lion)? Did you know that (in most apps) you can still use “Save As…” if you press the ⌥ (option/alt) key when you go to the “File” menu? Even better, if you re-assign ⌘+⇧+S to “Save As…” you can have it appear without having to remember to hold down the ⌥ key. I wrote that up on TUAW a few years ago, and I recently made a one-minute How to Bring Back “Save As” in OS X screencast as well, showing how it is done. Just don’t compare the quality of my screen-cast to David’s. (Spoiler alert: his is much better!)

Unlock More with Club MacStories

Founded in 2015, Club MacStories has delivered exclusive content every week for over six years.

In that time, members have enjoyed nearly 400 weekly and monthly newsletters packed with more of your favorite MacStories writing as well as Club-only podcasts, eBooks, discounts on apps, icons, and services. Join today, and you’ll get everything new that we publish every week, plus access to our entire archive of back issues and downloadable perks.

The Club expanded in 2021 with Club MacStories+ and Club Premier. Club MacStories+ members enjoy even more exclusive stories, a vibrant Discord community, a rotating roster of app discounts, and more. And, with Club Premier, you get everything we offer at every Club level plus an extended, ad-free version of our podcast AppStories that is delivered early each week in high-bitrate audio.

Choose the Club plan that’s right for you:

  • Club MacStories: Weekly and monthly newsletters via email and the web that are brimming with app collections, tips, automation workflows, longform writing, a Club-only podcast, periodic giveaways, and more;
  • Club MacStories+: Everything that Club MacStories offers, plus exclusive content like Federico’s Automation Academy and John’s Macintosh Desktop Experience, a powerful web app for searching and exploring over 6 years of content and creating custom RSS feeds of Club content, an active Discord community, and a rotating collection of discounts, and more;
  • Club Premier: Everything in from our other plans and AppStories+, an extended version of our flagship podcast that’s delivered early, ad-free, and in high-bitrate audio.