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

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!ames!data.nas.nasa.gov!taligent!nuntius
  3. From: Andrew G. Shebanow <shebanow@taligent.com>
  4. Subject: Re: Q: Checking for modif keys on app startup
  5. Message-ID: <Bs619u.Fr6@taligent.com>
  6. Sender: usenet@taligent.com (More Bytes Than You Can Read)
  7. Organization: Taligent, Inc.
  8. X-Useragent: Nuntius v1.1
  9. References: <1992Jul28.162138.9681@leland.Stanford.EDU>
  10.      <1992Jul29.144320.18410@bmers95.bnr.ca>
  11. Date: Wed, 29 Jul 1992 19:39:30 GMT
  12. Lines: 13
  13.  
  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. GetKeys is your only recourse if you are doing something that requires a
  22. lot of keyboard smarts, like a keyboard controlled game.
  23.  
  24. Have fun,
  25.  
  26. Andy
  27.