Re: keydown events + full-screen nswindow subclass
Re: keydown events + full-screen nswindow subclass
- Subject: Re: keydown events + full-screen nswindow subclass
- From: Ricky Sharp <email@hidden>
- Date: Fri, 31 Mar 2006 08:43:34 -0600
On Friday, March 31, 2006, at 03:58AM, Alex Reynolds <email@hidden> wrote:
>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?
See makeKeyAndOrderFront:
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
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