• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
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


  • 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

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

  • Prev by Date: Help in 2 Diamensional Array
  • Next by Date: Programmatically creating CoreData Entities - Source Code for Newbies?
  • Previous by thread: keydown events + full-screen nswindow subclass
  • Next by thread: Help in 2 Diamensional Array
  • Index(es):
    • Date
    • Thread