home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / mac / programm / 18630 < prev    next >
Encoding:
Text File  |  1992-11-18  |  1.7 KB  |  40 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!sun-barr!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!darwin.sura.net!news.udel.edu!chopin.udel.edu!kurisuto
  3. From: kurisuto@chopin.udel.edu (Sean J. Crist)
  4. Subject: Determining modifier key status without an event record
  5. Message-ID: <Bxy4IM.25J@news.udel.edu>
  6. Sender: usenet@news.udel.edu
  7. Nntp-Posting-Host: chopin.udel.edu
  8. Organization: University of Delaware
  9. Date: Thu, 19 Nov 1992 04:30:22 GMT
  10. Lines: 28
  11.  
  12. The orthodox method of determining the status of the modifier keys is
  13. by looking at an event record.  The modifier bits are even set correctly
  14. for null events, so within the event loop, it is always possible to
  15. determine the status of the modifier keys.
  16.  
  17. However, I need to find the status of the modifier keys in contexts
  18. where no reliable event record is available.  Specifically:
  19.  
  20. 1.  I want to know what the status of the modifier keys at the earliest
  21.     possible moment when the application starts up.  I have an optional
  22.     short-cut which is invoked if the user holds down the command key
  23.     when starting the application.
  24.  
  25. 2.  I want to know what modifier keys are down when the user has selected
  26.     something from a menu.  The original mousedown event in the menu
  27.     bar is not a reliable source, because the user might have pressed
  28.     the mod keys after clicking the mouse and while viewing the menus.
  29.     (I have another shortcut which I want to invoke if the user holds
  30.     down certain modifier keys while making certain menu selections).
  31.  
  32. Is there some way to find out the status of the mod keys in these contexts?
  33. If the answer is something really risky and unsupported, I'd be more
  34. inclined just to scrap these shortcuts, but I'd like to make them
  35. available if it's possible.
  36.  
  37. --Kurisuto
  38.  
  39.  
  40.