home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / misc1 / keycheck.bas (.txt) < prev    next >
Encoding:
GW-BASIC  |  1986-05-31  |  384 b   |  7 lines

  1. 10  CLS:KEY OFF:PRINT"Press any key(s) to see scan code returned.":PRINT
  2. 20  PRINT"Press ESC to exit program":PRINT
  3. 30  X$=INKEY$:IF X$="" GOTO 30
  4. 40  IF ASC(X$)=27 THEN PRINT" 27":PRINT:PRINT"That was the escape key...Returning to DOS.":SYSTEM
  5. 50  IF LEN(X$)=2 THEN PRINT ASC(LEFT$(X$,1));"  ";ASC(RIGHT$(X$,1)):GOTO 30
  6. 60  PRINT ASC(X$):GOTO 30
  7.