> I am using NSBorderless style mask for window and I am unable to receive > the NSKeyDown event for that window.But if I make the window style as titled > then I am able to receive the keyDown events. > > I am using below function for Keydown event: > > - (void)keyDown:(NSEvent *) event
Implement -(BOOL)canBecomeKeyWindow and return YES. The NSWindow implementation returns YES if the receiver has a title bar or a resize bar, NO otherwise. A borderless window does not have a titlebar or a resize bar, hence it returns NO and never receives the event. /Dado _______________________________________________ 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