keydown events + full-screen nswindow subclass
keydown events + full-screen nswindow subclass
- Subject: keydown events + full-screen nswindow subclass
- From: Alex Reynolds <email@hidden>
- Date: Fri, 31 Mar 2006 04:58:23 -0500
I have a subclass of NSWindow to which I've added:
- (BOOL) canBecomeKeyWindow
{
return YES;
}
- (BOOL) canBecomeMainWindow
{
return YES;
}
- (void) keyDown: (NSEvent *) event
{
if ([event keyCode] == 53)
{
NSLog(@"Escape has been pressed");
}
}
I've made this NSWindow an "initialFirstResponder" and it is in the
delegate chain.
Unfortunately, when the NSWindow is full-screen, and I press Esc,
nothing gets logged to the console.
Are there other methods I need to implement?
I tried implementing
[self makeFirstResponder:self]
for this subclass, but this doesn't appear to help.
How does one capture keyDown events in this situation?
Thanks,
Alex
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden