Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!pt.cs.cmu.edu!cadre.dsl.pitt.edu!pitt!yubing@vax.cs.pitt.edu From: yubing@vax.cs.pitt.edu (Bing Yu) Newsgroups: comp.lang.pascal Subject: Readkey without "use crt" (Was Re: Strobing the keyboard) Keywords: keyboard strobe strobing Message-ID: <6233@pitt.UUCP> Date: 16 Nov 89 02:39:17 GMT References: <1261@rodan.acs.syr.edu: <79164@linus.UUCP> Sender: yubing@pitt.UUCP Reply-To: yubing@vax.cs.pitt.edu (Bing Yu) Distribution: usa Organization: Univ. of Pittsburgh Computer Science Lines: 30 In article <79164@linus.UUCP: carlson@gateway.mitre.org (Bruce Carlson) writes: :In article <1261@rodan.acs.syr.edu> wwtaroli@rodan.acs.syr.edu (Bill Taroli) writes: :>I believe this may have been discussed before, but I need this information :>in a hurry. Is anyone aware of a function in TP that will allow one to :>strobe the keyboard... or basically check the queue to see if a key is :>waiting to be read? :>Bill Taroli :>WWTAROLI@RODAN.acs.syr.edu : :The function KeyPressed (boolean) determines if a key has been pressed. It :is nondestructive, so the value is still in the keyboard buffer. :It does not detect the 'shift' keys like Alt, Shift, Numlock, etc. : :The function ReadKey reads the value in the keyboard buffer, and you can :then assign this value to one of your variables. If it is a special :key (function key, etc.) that generates an extended scan code it will :have two bytes. The first is #0 and the second is the extended scan code. :The extended scan code keys therefore require two executions of ReadKey. : :Bruce Carlson I have a problem similar to this: I want to have a function same as Readkey but do NOT want to "use crt". The reason for this is that I want to force the crt i/o go through dos so that it can be handled by a driver similar to ansi.sys. I tried read(input,c) but have to press RETURN after the key is pressed. Does anyone know how to make it work? Thanks. Bing Yu yubing@vax.cs.pitt.edu