• 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: NSScreenSaverView and keystrokes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSScreenSaverView and keystrokes (From: Eric Hon-Anderson <email@hidden>)

  • Prev by Date: Re: AppKit source available as reference?
  • Next by Date: Re: Sit on it and rotate ??
  • Previous by thread: NSScreenSaverView and keystrokes
  • Next by thread: Re: NSScreenSaverView and keystrokes
  • Index(es):
    • Date
    • Thread