home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 13180 < prev    next >
Encoding:
Text File  |  1992-07-29  |  1.4 KB  |  30 lines

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