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.  You typically "receive" a keyDown (or other) 
event by overriding, say, -keyDown in any NSResponder subclass (view or 
window), and then use the Cocoa code given in the post by VassilisGr in that 
stackoverflow article to find what modifier keys are down.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to