• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Menu Item Shortcuts Without Menu Items?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Menu Item Shortcuts Without Menu Items?


  • Subject: Menu Item Shortcuts Without Menu Items?
  • From: "Frank D. Engel, Jr." <email@hidden>
  • Date: Mon, 13 Mar 2017 18:12:19 -0400

I need to create the equivalent of a menu item shortcut, but without the menu item... or, to assign two different shortcuts to the same menu item.

More precisely: I have a menu item with a shortcut of Command+L.

I need Command+Shift+L to do exactly the same thing, but it doesn't look right having two copies of the menu item just to support a second shortcut.

This needs to work across multiple windows of the application, and there are enough distinct types that it would be annoying to need to create and maintain a separate implementation of a solution for each separate window.

Anyone know how I might be able to pull this off? Neither the NSApplication nor the NSDocument seem to receive the "performKeyEquivalent:" method, so not quite sure where to go with this one.


Note that I am doing this because of interfacing with an external controller which, because of the way I am hoping to rig this to behave in a reasonable way, will sometimes send the keystroke with and sometimes without the shift - this is an implementation detail that I don't expect the user to be aware of (if they happen to hold down shift while hitting Command+L... I don't particularly care - won't really matter :-)


Thank you!



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Menu Item Shortcuts Without Menu Items?
      • From: Steve Mills <email@hidden>
    • Re: Menu Item Shortcuts Without Menu Items?
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Library Location
  • Next by Date: Re: Menu Item Shortcuts Without Menu Items?
  • Previous by thread: Re: Library Location
  • Next by thread: Re: Menu Item Shortcuts Without Menu Items?
  • Index(es):
    • Date
    • Thread