• 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
keydown events + full-screen nswindow subclass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: keydown events + full-screen nswindow subclass
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Re: NSURL from a sidebar plist entry (object for key "Alias")? [SOLVED]
  • Next by Date: Re: Sending mail
  • Previous by thread: CD: Splitting persistent stores between document and constant entities
  • Next by thread: Re: keydown events + full-screen nswindow subclass
  • Index(es):
    • Date
    • Thread