Re: Unable to receive keyDown Event in NSBorderlesswindow
Re: Unable to receive keyDown Event in NSBorderlesswindow
- Subject: Re: Unable to receive keyDown Event in NSBorderlesswindow
- From: Dado Colussi <email@hidden>
- Date: Thu, 11 Mar 2010 13:56:53 +0100
> 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 (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