Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!stanford.edu!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!quiche!einstein From: einstein@cs.mcgill.ca (Michael CHOWET) Newsgroups: comp.lang.pascal Subject: Re: CTRL-Characters Message-ID: <1991Mar30.081820.8305@cs.mcgill.ca> Date: 30 Mar 91 08:18:20 GMT References: <1991Mar27.160905.1962@cs.mcgill.ca> <1991Mar27.161213.2100@cs.mcgill.ca> Sender: news@cs.mcgill.ca (Netnews Administrator) Organization: SOCS, McGill University, Montreal, Canada Lines: 23 In article <1991Mar27.161213.2100@cs.mcgill.ca> storm@cs.mcgill.ca (Marc WANDSCHNEIDER) writes: >How do I make a PASCAL program recognize CTRL characters (or ALT characters >for that matter). Ie I want the following: > IF CH = CTRL-G then > BEGIN > blahblahb > END; Actually, there are two ways to get at this. If you feel like dragging out the list of ASCII codes, you can type: If CH = #07 Then DoSomething ; Basically, the # symbol followed by the ASCII code. Simple enough, right? But if you want the actual character in there, hit the ^P. The following character (your CTRL-char) will be accepted as a literal, ie it will be inserted into the text without trying to process it as an editor control key. Hope that helps.