Re: Getting keyDowns
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