home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!caen!uwm.edu!csd4.csd.uwm.edu!randyd
- From: randyd@csd4.csd.uwm.edu (Randall Elton Ding)
- Newsgroups: comp.lang.pascal
- Subject: reading alternate keys on ibm from turbo
- Date: 5 Nov 1992 19:16:34 GMT
- Organization: Computing Services Division, University of Wisconsin - Milwaukee
- Lines: 33
- Distribution: usa
- Message-ID: <1dbruiINNbai@uwm.edu>
- NNTP-Posting-Host: 129.89.7.4
-
- Someone asked for a program to read alternate keys from the IBM,
- Here it is...
-
- from: randyd@csd4.csd.uwm.edu
-
- program ibmkeyread;
-
- uses crt;
-
- procedure keyread (var ch: char; var alt: boolean);
- begin
- ch:= readkey;
- alt:= (ch=#0) and keypressed;
- if alt then ch:= readkey;
- end;
-
- procedure main;
- var
- ch: char;
- alt: boolean;
-
- begin
- repeat
- keyread (ch,alt);
- if alt then write ('alt - ');
- writeln (ch,' ',ord (ch));
- until (ch=#27) and (not alt); { esc key }
- end;
-
- begin
- main;
- end.
-
-