Re: NSScreenSaverView and keystrokes
Re: NSScreenSaverView and keystrokes
- Subject: Re: NSScreenSaverView and keystrokes
- From: David Hill <email@hidden>
- Date: Thu, 28 Jun 2001 09:26:38 -0700
Your ScreenSaverView subclass just needs to override the keystroke
handling methods from NSResponder:
- (void)keyDown:(NSEvent *)theEvent;
- (void)keyUp:(NSEvent *)theEvent;
That will suck up the keyboard events without waking up the screensaver.
You can do the same with mouse movement as well. Just make sure the user
has some way to exit the saver.
Dave
On Thursday, June 28, 2001, at 07:39 AM, Eric Hon-Anderson wrote:
The After Dark screen saver on the old Mac OS supplied an API for screen
saver modules to intercept events for their own use, without signalling
the screen saver to quit. This was used to make a small number of
keyboard-only games, and to control aspects of some screen saver modules
as they ran. I wasn't able to find an equivalent API in NSScreenSaverView
and its relatives. Did I miss something that would be obvious to someone
with more Cocoa experience? Thanks.
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev