Re: Intercepting *all* keystrokes in NSView?
Re: Intercepting *all* keystrokes in NSView?
- Subject: Re: Intercepting *all* keystrokes in NSView?
- From: Ken Thomases <email@hidden>
- Date: Mon, 04 Aug 2014 22:53:03 -0500
On May 28, 2014, at 11:57 PM, Alex Hall <email@hidden> wrote:
> -(BOOL) performKeyEquivalent:(NSEvent*) event{
> [self handleKeyUpAndKeyEquivalent:event];
> return NO;
> return [super performKeyEquivalent:event];
> }
> Everything works (well, basically) except those menu item hotkeys. I get a log of them, since my app logs every keystroke it detects, but they aren't stopped.
If you want to "stop" the menu item hotkeys, why are you not returning YES from -performKeyEquivalent:?
But, as mentioned, your best bet for getting as many key events as possible is an event tap.
Regards,
Ken
_______________________________________________
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