Hi, On Dec 30, 2013, at 4:34 PM, Alex Hall wrote:
> Anyway, the problem remains that I need to capture keystrokes (and eventually > mouse movements) in a subclass of NSView, but nothing seems to happen. In order for a view to receive key events, it must be the first responder. Typically, you need to override -acceptsFirstResponder to return YES to allow a view to become the first responder. (There are other approaches, but that's the normal one.) After that, you either want to set the window's initialFirstResponder to be that view before the window is shown or you want to call -[NSWindow makeFirstResponder:] to set the first responder at a later time. Cheers, Ken _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com