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

Re: Setting Menu Item's Keyboard Shortcut


  • Subject: Re: Setting Menu Item's Keyboard Shortcut
  • From: Nathan Greenstein <email@hidden>
  • Date: Sat, 18 Dec 2010 07:50:48 -0800

Hi All,

Many thanks Shane, that did the trick.
Everything's working except for one thing: sometimes I want cmd-opt. So, I assume I use NSAlternateKeyMask ("use when option or alt is pressed"). Using identical code to what I use to set cmd-shift (which works fine), I end up with a blank keyboard shortcut. The log confirms that I'm setting it to the correct thing, and that the property is changing (I read it back, and it has changed to what I set it to) It's just not appearing for some reason. Is there something special I should know about NSAlternateKeyMask?

Ideas?

Thanks again,
--
Nathan Greenstein
email@hidden



On Fri, Dec 17, 2010 at 15:32, Shane Stanley <email@hidden> wrote:
You need to coerce them to integers and add them:

myMenu's setKeyEquivalentModifierMask_((current application's
NSCommandKeyMask) as integer + (current application's NSShiftKeyMask) as
integer)


--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>


 _______________________________________________
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

 _______________________________________________
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

References: 
 >Setting Menu Item's Keyboard Shortcut (From: Nathan Greenstein <email@hidden>)
 >Re: Setting Menu Item's Keyboard Shortcut (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Setting Menu Item's Keyboard Shortcut
  • Next by Date: AppleScriptObjC framework error?
  • Previous by thread: Re: Setting Menu Item's Keyboard Shortcut
  • Next by thread: AppleScriptObjC framework error?
  • Index(es):
    • Date
    • Thread