• 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: Getting Keyboard Events at Full Screen
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting Keyboard Events at Full Screen


  • Subject: Re: Getting Keyboard Events at Full Screen
  • From: Brian Christensen <email@hidden>
  • Date: Fri, 23 Nov 2001 10:54:22 +0100

On Friday, November 23, 2001, at 07:16 AM, cocoa-dev-
email@hidden wrote:

After following all the directions at cocoadevcentral.com (including the
part on how to get key events) I still can't grab them.

Before, I made a view and in the MyView.m file I included this:

- (void)awakeFromNib
{
[mainWindow setFirstResponder:self];
}

And it worked!

Now it's more complicated. Since I created the window programmatically, it
can't be an IBOutlet and I have to access it with [NSApp keyWindow].

Now I have subclassed NSWindow and overridden canBecomeKeyWindow and even
isKeyWindow, but still can't get it to work.

If you can help, but need the source, I'll gladly give it to you.

Are you creating the window like this?

// Put up a new full screen window
mainWindow = [[MyWindow alloc] initWithContentRect:screenRect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO screen:[NSScreen mainScreen]];

(Not using [[NSWindow alloc] etc] but rather [[MyWindowSubclassHere alloc] etc]).

-- Brian


  • Follow-Ups:
    • Re: Getting Keyboard Events at Full Screen
      • From: Sam Goldman <email@hidden>
  • Prev by Date: Re: automatic spell checking
  • Next by Date: Re: Getting Keyboard Events at Full Screen
  • Previous by thread: Getting Keyboard Events at Full Screen
  • Next by thread: Re: Getting Keyboard Events at Full Screen
  • Index(es):
    • Date
    • Thread