• 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
Setting Menu Item's Keyboard Shortcut
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting Menu Item's Keyboard Shortcut


  • Subject: Setting Menu Item's Keyboard Shortcut
  • From: Nathan Greenstein <email@hidden>
  • Date: Fri, 17 Dec 2010 09:11:51 -0800

Hi All, got a new one for you today.

I'm trying to change the keyboard shortcut for a menu item. Here's the code I'm using:
myMenu's setKeyEquivalent_("c")
myMenu's setKeyEquivalentModifierMask_(current application's NSCommandKeyMask, current application's NSShiftKeyMask)
So, the goal here is to set the shortcut to shift-cmd-c. These functions are discussed in the MSMenuItem Class Ref doc.
Here's the problem: It uses the OR/pipe operator. I can't figure out how to replicate that in ASOC. I've tried lists, commas, the or keyword, and lots of parentheses/coercion stuff. None of it works. The closest I've gotten is what's above; it uses just the first term (command, in this case).
Ideas?

Many thanks,
--
Nathan Greenstein
email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Setting Menu Item's Keyboard Shortcut
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Silly Question: Hiding Source
  • Next by Date: Re: Setting Menu Item's Keyboard Shortcut
  • Previous by thread: Re: Silly Question: Hiding Source
  • Next by thread: Re: Setting Menu Item's Keyboard Shortcut
  • Index(es):
    • Date
    • Thread