home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- 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
- From: kurisuto@chopin.udel.edu (Sean J. Crist)
- Subject: Determining modifier key status without an event record
- Message-ID: <Bxy4IM.25J@news.udel.edu>
- Sender: usenet@news.udel.edu
- Nntp-Posting-Host: chopin.udel.edu
- Organization: University of Delaware
- Date: Thu, 19 Nov 1992 04:30:22 GMT
- Lines: 28
-
- 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.
-
- 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).
-
- 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.
-
- --Kurisuto
-
-
-