• 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 keyDowns
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting keyDowns


  • Subject: Re: Getting keyDowns
  • From: Rosyna <email@hidden>
  • Date: Sun, 26 Aug 2001 15:33:01 -0700

I know it is getting some sort of event as it responds to windowWillClose and when I enable the text field, I can type it in. But neither mouseDown or keyDown get called. KeyHandler is now a subclass of NSResponder as well.

Ack, at 8/26/01, John C. Randolph said:

First thing I'd try is to make the window the key window in -appDidInit instead of -awakeFromNib (which means that your KeyHandler instance will also need to be the App delegate), and the second thing I'd try is checking the window event mask to be sure the window's taking keydown events. IIRC, you don't need to bother doing that if there's an active text field in the window, since it should modify the event mask as necessary in its -becomeFirstResponder method.

You can get the window's event mask in the debugger with "p (int) window->_winEventMask". To check if it's taking keydowns, use "p (int) window->_winEventMask | NSKeyDownMask".

I know that in NeXTSTEP, there was a method to set the window's event mask, but I can't seem to find it in the 10.0 docs.

--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insane People


  • Follow-Ups:
    • Re: Getting keyDowns
      • From: Ondra Cada <email@hidden>
References: 
 >Re: Getting keyDowns (From: "John C. Randolph" <email@hidden>)

  • Prev by Date: Re: [NEWBIE] App with no initial document?
  • Next by Date: Re: Getting keyDowns
  • Previous by thread: Re: Getting keyDowns
  • Next by thread: Re: Getting keyDowns
  • Index(es):
    • Date
    • Thread