• 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
Re: Menu Item Shortcuts Without Menu Items?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Menu Item Shortcuts Without Menu Items?


  • Subject: Re: Menu Item Shortcuts Without Menu Items?
  • From: Steve Mills <email@hidden>
  • Date: Mon, 13 Mar 2017 17:50:53 -0500

> On Mar 13, 2017, at 17:12, Frank D. Engel, Jr. <email@hidden> wrote:
>
> 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 :-)

Add a second item as an Alternate item and give it command-shift-L.

Steve via iPad


_______________________________________________

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


References: 
 >Menu Item Shortcuts Without Menu Items? (From: "Frank D. Engel, Jr." <email@hidden>)

  • Prev by Date: Re: Menu Item Shortcuts Without Menu Items?
  • Next by Date: NSMutableData +dataWithLength: sets errno?
  • Previous by thread: Re: Menu Item Shortcuts Without Menu Items?
  • Next by thread: NSMutableData +dataWithLength: sets errno?
  • Index(es):
    • Date
    • Thread