Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!psuvm.bitnet!cunyvm!byuvax!taylorj From: taylorj@yvax.byu.edu Newsgroups: comp.sys.mac.hypercard Subject: Re: Trapping Keypresses Message-ID: <621taylorj@yvax.byu.edu> Date: 3 Jun 89 04:23:17 GMT Lines: 14 I know of two ways to trap keypresses. Both require XCMDs. The first is an XFCN called InKey that will return any pending keypressed when called. You put it in an idle loop. It works ok if the user doesn't type too fast. The other is an XCMD called ControlLock that makes the Mac think the Control key is locked (even on keyboards with no Control key), thus generating a controlKey message on every keypress. (I prefer this one, as you get a message generated for every keypress and never lose any.) These are both short, and have both been posted to this newsgroup. If enough people clamor, I can repost them. Jim Taylor Microcomputer Support for Curriculum Brigham Young University taylorj@byuvax.bitnet