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

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!mcsun!sunic!corax.udac.uu.se!tdb!bredell
  3. From: bredell@tdb.uu.se (Mats Bredell)
  4. Subject: Re: Determining modifier key status without an event record
  5. Message-ID: <1992Nov20.090240.10742@tdb.uu.se>
  6. Reply-To: Mats.Bredell@udac.uu.se
  7. Organization: Uppsala University Computing Center (UDAC)
  8. X-Newsreader: TIN [version 1.1 PL6]
  9. References: <Bxy4IM.25J@news.udel.edu>
  10. Date: Fri, 20 Nov 1992 09:02:40 GMT
  11. Lines: 40
  12.  
  13. Sean J. Crist (kurisuto@chopin.udel.edu) wrote:
  14. : The orthodox method of determining the status of the modifier keys is
  15. : by looking at an event record.  The modifier bits are even set correctly
  16. : for null events, so within the event loop, it is always possible to
  17. : determine the status of the modifier keys.
  18. : However, I need to find the status of the modifier keys in contexts
  19. : where no reliable event record is available.  Specifically:
  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. I don't know about this one, except for testing the very first event you get.
  26.  
  27. : 2.  I want to know what modifier keys are down when the user has selected
  28. :     something from a menu.  The original mousedown event in the menu
  29. :     bar is not a reliable source, because the user might have pressed
  30. :     the mod keys after clicking the mouse and while viewing the menus.
  31. :     (I have another shortcut which I want to invoke if the user holds
  32. :     down certain modifier keys while making certain menu selections).
  33.  
  34. A lot of programs behave differently if you hold down a certain modifier key
  35. while selecting from the menu. However, you should also change the menu item
  36. title when this happens. I've never seen a program that lets you press the
  37. modifier *after* the original menu click. Why not require that the user is
  38. holding the modifier key when he makes the click in the menubar?
  39.  
  40. : Is there some way to find out the status of the mod keys in these contexts?
  41. : If the answer is something really risky and unsupported, I'd be more
  42. : inclined just to scrap these shortcuts, but I'd like to make them
  43. : available if it's possible.
  44.  
  45. /Mats
  46. -- 
  47. Mats Bredell                                   Mats.Bredell@udac.uu.se
  48. Uppsala University Computing Center (UDAC)     Ph:  +46 18 187817
  49. Department of medical systems                  Fax: +46 18 187825
  50. Sweden                                         Think straight - be gay!
  51.