Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: keydown events + full-screen nswindow subclass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: keydown events + full-screen nswindow subclass



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

References: 
 >keydown events + full-screen nswindow subclass (From: Alex Reynolds <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.