home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!mcsun!sunic!corax.udac.uu.se!tdb!bredell
- From: bredell@tdb.uu.se (Mats Bredell)
- Subject: Re: Determining modifier key status without an event record
- Message-ID: <1992Nov20.090240.10742@tdb.uu.se>
- Reply-To: Mats.Bredell@udac.uu.se
- Organization: Uppsala University Computing Center (UDAC)
- X-Newsreader: TIN [version 1.1 PL6]
- References: <Bxy4IM.25J@news.udel.edu>
- Date: Fri, 20 Nov 1992 09:02:40 GMT
- Lines: 40
-
- Sean J. Crist (kurisuto@chopin.udel.edu) wrote:
- : The orthodox method of determining the status of the modifier keys is
- : by looking at an event record. The modifier bits are even set correctly
- : for null events, so within the event loop, it is always possible to
- : determine the status of the modifier keys.
- :
- : However, I need to find the status of the modifier keys in contexts
- : where no reliable event record is available. Specifically:
- :
- : 1. I want to know what the status of the modifier keys at the earliest
- : possible moment when the application starts up. I have an optional
- : short-cut which is invoked if the user holds down the command key
- : when starting the application.
-
- I don't know about this one, except for testing the very first event you get.
-
- : 2. I want to know what modifier keys are down when the user has selected
- : something from a menu. The original mousedown event in the menu
- : bar is not a reliable source, because the user might have pressed
- : the mod keys after clicking the mouse and while viewing the menus.
- : (I have another shortcut which I want to invoke if the user holds
- : down certain modifier keys while making certain menu selections).
-
- A lot of programs behave differently if you hold down a certain modifier key
- while selecting from the menu. However, you should also change the menu item
- title when this happens. I've never seen a program that lets you press the
- modifier *after* the original menu click. Why not require that the user is
- holding the modifier key when he makes the click in the menubar?
-
- : Is there some way to find out the status of the mod keys in these contexts?
- : If the answer is something really risky and unsupported, I'd be more
- : inclined just to scrap these shortcuts, but I'd like to make them
- : available if it's possible.
-
- /Mats
- --
- Mats Bredell Mats.Bredell@udac.uu.se
- Uppsala University Computing Center (UDAC) Ph: +46 18 187817
- Department of medical systems Fax: +46 18 187825
- Sweden Think straight - be gay!
-