Re: Getting keyDowns
Re: Getting keyDowns
- Subject: Re: Getting keyDowns
- From: Finlay Dobbie <email@hidden>
- Date: Sun, 26 Aug 2001 20:46:48 +0100
On Sunday, August 26, 2001, at 08:30 pm, John C. Randolph wrote:
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.
I haven't checked, but this should suffice:
@interface NSWindow(EventMaskSetting)
- (void)setEventMask:(int)newEventMask;
@end
@implementation NSWindow(NSEventMaskSetting)
- (void)setEventMask:(int)newEventMask {
_winEventMask = newEventMask;
}
@end
Oh, the joy of categories! :-)
-- Finlay