Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!bionet!ames!claris!apple!casseres From: casseres@Apple.COM (David Casseres) Newsgroups: comp.sys.mac.hypercard Subject: Re: what was the last key hit? Message-ID: <735@internal.Apple.COM> Date: 21 Feb 89 17:50:01 GMT References: <2460@ilium.cs.swarthmore.edu> Organization: Apple Computer Inc, Cupertino, CA Lines: 24 In article <2460@ilium.cs.swarthmore.edu> annie@cs.swarthmore.edu (Annie Fetter) writes: >In article <708@internal.Apple.COM> carterbk@apple.com (Bryan 'STAKMan' Carter) writes: >> There is an XFCN called InKey() which, when called in a handler such as >> >> Bryan K. 'STAKMan' Carter > >I have this XFCN, and will send it to anyone who wants it. Just send me a note >and I'll get it out. If you don't have this XFCN, you need it. Just think, >BASIC had this, why shouldn't HyperTalk? I tried using InKey, but there are two problems. First, InKey not only tells me what the last character was, it also removes the event from the queue. That means if it isn't a character I want to do something with, I must either do something with it anyway or throw it away. Now, I could write an XCMD to put it back on the queue, or I could write a replacement for InKey that would leave the character on the queue, but I would still have the second problem: the Idle handler doesn't get called often enough to guarantee that I catch all the characters, and in fact it's easy to type fast enough that this is a problem. I think HyperCard itself should have a system message called On Keystroke. Are you listening, Dan? David Casseres