home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!usc!sdd.hp.com!ux1.cso.uiuc.edu!uchinews!quads!jcav
- From: jcav@quads.uchicago.edu (JohnC)
- Subject: Re: Q: Checking for modif keys on app startup
- Message-ID: <1992Jul29.202902.22349@midway.uchicago.edu>
- Sender: news@uchinews.uchicago.edu (News System)
- Reply-To: jcav@midway.uchicago.edu
- Organization: The Royal Society for Putting Things on Top of Other Things
- References: <1992Jul28.162138.9681@leland.Stanford.EDU> <1992Jul29.144320.18410@bmers95.bnr.ca> <Bs619u.Fr6@taligent.com>
- Date: Wed, 29 Jul 1992 20:29:02 GMT
- Lines: 17
-
- In article <Bs619u.Fr6@taligent.com> shebanow@taligent.com (Andrew G. Shebanow) writes:
- >I would recommend using EventAvail (or GetOSEvent, as Keith suggests):
- >
- > EventAvail(everyEvent,&myEvent);
- >
- >if all you are checking for is the modifier keys. Testing the modifiers
- >field of the Event record is much easier than bit-twiddling with GetKeys.
-
- If I want to do is get a "snapshot" of the modifiers, I call _OSEventAvail
- with an event mask of zero. This seems to me to have the lowest overhead
- (no context-switching, etc.)
-
- --
- John Cavallino | EMail: jcav@midway.uchicago.edu
- University of Chicago Hospitals | John_Cavallino@uchfm.bsd.uchicago.edu
- Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
- B0 f++ c+ g++ k s++ e+ h- pv | Chicago, IL 60637
-