Re: NSDocument-oriented app and -keydown
Re: NSDocument-oriented app and -keydown
- Subject: Re: NSDocument-oriented app and -keydown
- From: Kyle Sluder <email@hidden>
- Date: Thu, 29 Sep 2011 09:22:03 -0700
On Thu, Sep 29, 2011 at 8:30 AM, Jerry Krinock <email@hidden> wrote:
>
> On 2011 Sep 29, at 07:42, Nick wrote:
>
>> but this does not let (as i understand) attach the event to the particular window-document, it
>> is application wide. How can I receive such an event in an NSDocument's subclass?
>
> I'm not sure what you mean by "attach the event", Nick, but the Mac has only one keyboard and therefore any determination of what modifier keys are down is going to be application-wide.
Actually not so, as I discovered yesterday. I have two keyboards
attached to my Mac. Holding Cmd on one and pressing "A" on the other
does *not* result in a Cmd-A being sent to the app. Modifier keys are
attached to the keyboard they came from. In my scenario, you get a
"flagsChanged" event for the Cmd key and a regular keyDown event for
the A key.
--Kyle Sluder
_______________________________________________
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