Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!apple!stevec From: stevec@Apple.COM (Steve Christensen) Newsgroups: comp.sys.mac.programmer Subject: Re: How can I get Instantaneous Response from an Init that uses GNEfilter to look for keyboard events? Message-ID: <10032@goofy.Apple.COM> Date: 4 Sep 90 18:49:21 GMT References: <1896@mountn.dec.com> Organization: Apple Computer Inc., Cupertino, CA Lines: 37 In article <1896@mountn.dec.com> George Domenikos writes: >I am having an INIT that installs its self successfully and is using the >GNEfilter method to look for events such as keyboard and perform certain >action when a certain key sequence is pressed. >[...] >HOW CAN I GET INSTANTANEOUS RESPONSE FROM THE GNE FILTER? You can't. The GNE filter only gets called when GetNextEvent gets called, so if an application is busy doing something else, it would have to wait. >Do I have to install a VBL task for that that checks for Events all the time >and if a certain key is pressed can jump into my routine and performed >the desired action? Well, you can certainly use a VBL task to see if a particular key combination is being pressed. However if you run from a VBL task, you can't use QuickDraw or call the Memory Manager, or use any services that call either. Instead, your VBL task could setup a deferred task that would be called as soon as the interrupt level returns to zero. >Do I have perhaps to raise the interrupt priority of the GNEfilter and how >can I do it? Since it's only called thru GNE, changing interrupt priorities don't even make sense here. steve -- ____________________________________________________________________ Steve Christensen Internet: stevec@goofy.apple.com Apple Computer, Inc. AppleLink: STEVEC 20525 Mariani Ave, MS 81-CS CompuServe: 76174,1712 Cupertino, CA 95014 "You just contradicted me." "No I didn't." ____________________________________________________________________