Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!usc!snorkelwacker!bloom-beacon!eru!hagbard!sunic!nuug!ulrik!ulrik!oivindt From: oivindt@ulrik.uio.no (Oivind Toien) Newsgroups: comp.lang.pascal Subject: Re: Scan codes in TurboPascal Message-ID: Date: 15 Sep 90 17:52:58 GMT References: <1561.26f20a24@waikato.ac.nz> Sender: oivindt@ulrik.uio.no (Oivind Toien) Organization: University of Oslo, Norway Lines: 25 In-Reply-To: iam@waikato.ac.nz's message of 14 Sep 90 23:01:55 GMT In article <1561.26f20a24@waikato.ac.nz> iam@waikato.ac.nz (Ian McDonald) writes: > How do you pick up Scan codes in TP 5.5? From my reading of the manuals you > have to resort to machine code. I am after picking up Ctrl-ESC as well as You can read the keyboard memory buffer. I do not have the specific code you want, but take a look at these examples, they checks whether the key is depressed: Function CtrlPressed:Boolean; begin If (MEM[0:$417] and 4)<>0 then CtrlPressed:=true else CtrlPressed:=False; end; Function ShiftPressed:Boolean; begin If (MEM[0:$417] and 2)<>0 then ShiftPressed:=true else ShiftPressed:=False; end; Hope this helps. Oivind