Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!uw-june!marty From: marty@uw-june.UUCP (Marty Sirkin) Newsgroups: comp.lang.pascal Subject: Re: Reading Function Keys - Turbo Pasca Message-ID: <3575@uw-june.UUCP> Date: Tue, 10-Nov-87 03:58:49 EST Article-I.D.: uw-june.3575 Posted: Tue Nov 10 03:58:49 1987 Date-Received: Thu, 12-Nov-87 06:15:43 EST References: <1329@cup.portal.com> <126200001@iucs> Organization: U of Washington, CSCI, Seattle Lines: 19 Summary: Scan codes are not escape sequences In article <126200001@iucs>, cjl@iucs.cs.indiana.edu writes: > >> The function keys actually return two codes when pressed. The first of >> these is an escape (ascii 27). (NOTE: This is in TP ONLY. In reality the >> first scan code is 0, and most languages use that. I don't know why Borland >> coverted it). The second is ... > > Unfortunately many application programs use ESC as an input command > e.g. aborting the execution. I guess it is for this reason IBM uses > NUL as the input escape character not ESC. This has nothing to do with the issue. The scan code returned by the *machine's* built-in interrupt is a 0, not a 27. Only Tp 3.0 converts it to an escape. Since no other key can possibly return a zero, that's why it is used (after all, with the routine I gave you can determine an escape from a page up, for example). BTW, I just got TP 4.0 and noticed that they changed it to ascii 0 for the first code... Marty Sirkin