Re: Setting Menu Item's Keyboard Shortcut
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?
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