MacOS – How to specify between identical menu command names when making custom shortcuts.

macosmail.appshortcutsystem-prefs

I commonly set custom keyboard shortcuts in System Prefs.

I tried setting a shortcut (command-shift-a, mirroring command-shift-j to move to junk) for Mail app to move messages to archive, since the default shortcut is rather weird (command-control-a).

But the menubar command is "Message / Archive", so what I enter in "System Preferences / Keyboard / Shortcuts / App Shortcuts" becomes simply "Archive". Thus it's getting confused with "Mailbox / Go to Favorite Mailbox / Archive".

Is there a way to specify which is which, to avoid the naming collision?

Best Answer

I found the answer on MacStories and SuperUser.

Colliding menubar command names can be specified via their nesting tree, using ->. Thus the shortcut name in my original question becomes Message->Archive.