Re: FlagsChanged while NSMenu is displayed

2014-01-25 Thread John Joyce
So, just to follow up. Timer approach works. It works quite well. Thanks for recommending it. In fact, far better than the CGEventTap approach in terms of reliability. CGEventTaps always seem to be a bit flaky. The NSTimer approach is very responsive and I can constrain it to just the time when t

Re: FlagsChanged while NSMenu is displayed

2014-01-24 Thread dangerwillrobinsondanger
I have not yet done that but I did find the Dave DeLong post on that technique in cocoa dev and in SO. It looks like it would work, but seems like a slight impedance mismatch in my brain. Probably because in a normal situation you can get events more gracefully. I will try it out later and se

Re: FlagsChanged while NSMenu is displayed

2014-01-24 Thread Jens Alfke
Have you tried running a timer that periodically checks the state of the modifier keys and adds/removes the menu item? —Jens ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Co

Re: FlagsChanged while NSMenu is displayed

2014-01-24 Thread dangerwillrobinsondanger
Hi Kyle Yes. I'm familiar with the genius simple alternate items setup. I actually want to emulate the Finder Go menu here and have a hidden item. No key equivalent for the item itself. Thanks Sent from my iPhone > On 2014/01/25, at 3:06, Kyle Sluder wrote: > >> On Fri, Jan 24, 2014, at 10

FlagsChanged while NSMenu is displayed

2014-01-24 Thread dangerwillrobinsondanger
I wanted to show a hidden menu item in the Window menu when the option key is pressed. Similar to the way the Finder's Go menu behaves with the user Library menu item. I was able to use the NSMenu delegate methods to do this by using a CGEventTap creating or re-enabling the tap in menuWillOpe

Re: FlagsChanged while NSMenu is displayed

2014-01-24 Thread Kyle Sluder
On Fri, Jan 24, 2014, at 10:04 AM, Kyle Sluder wrote: > On Fri, Jan 24, 2014, at 10:01 AM, dangerwillrobinsondan...@gmail.com > wrote: > > I wanted to show a hidden menu item in the Window menu when the option > > key is pressed. > > Similar to the way the Finder's Go menu behaves with the user Li

Re: FlagsChanged while NSMenu is displayed

2014-01-24 Thread Kyle Sluder
On Fri, Jan 24, 2014, at 10:01 AM, dangerwillrobinsondan...@gmail.com wrote: > I wanted to show a hidden menu item in the Window menu when the option > key is pressed. > Similar to the way the Finder's Go menu behaves with the user Library > menu item. This is done with alternate menu items. See