Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!unhd.unh.edu!oz!wjt From: wjt@oz.plymouth.edu (Bill Taffe) Newsgroups: comp.lang.pascal Subject: Re: CTRL-Characters Message-ID: <1991Mar28.005803.25890@oz.plymouth.edu> Date: 28 Mar 91 00:58:03 GMT References: <1991Mar27.160905.1962@cs.mcgill.ca> <1991Mar27.161213.2100@cs.mcgill.ca> Reply-To: wjt@oz.plymouth.edu (Bill Taffe) Organization: Plymouth State College - Plymouth, N.H. Lines: 24 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; The TP5.5 manual (which I happen to have handy) has a section describing how to do this - or some of these anyhow. There are "extended key codes" (see p424 ... table c.2) which give special codes for many ALT and CTRL keys. See also the readkey function on p337. When a special key is pressed, readkey first returns a null character #0 and then returns the extended scan code. There is an example on p 338. Bill Taffe Plymouth State College (NH) wjt@oz.plymouth.edu