home *** CD-ROM | disk | FTP | other *** search
/ 1,000 Games / Disc1.iso / ARCADE / REXDEMO / KEYTEST.RPP < prev    next >
Text File  |  1996-11-02  |  831b  |  59 lines

  1.  
  2. println("Press the arrow keys, <ESC> to quit...");
  3.  
  4. setcolor(14);
  5.  
  6. $checkkeys
  7.  
  8.   {clear keys}
  9.   setcursor(0,6);
  10.   print("           ");
  11.   setcursor(0,12);
  12.   print("           ");
  13.   setcursor(0,18);
  14.   print("           ");
  15.   setcursor(0,24);
  16.   print("           ");
  17.  
  18.   {check up arrow}
  19.   if (kbcode(72))
  20.     setcursor(0, 6);
  21.     print("up arrow");
  22.   endif;
  23.  
  24.   {check down arrow}
  25.   if (kbcode(80))
  26.    setcursor(0, 12);
  27.    print("down arrow");
  28.   endif; 
  29.  
  30.   {check left arrow}
  31.   if (kbcode(75))
  32.     setcursor(0,18);
  33.     print("left arrow");
  34.   endif;
  35.  
  36.   {check right arrow}
  37.   if (kbcode(77))
  38.     setcursor(0,24);
  39.     print("right arrow");
  40.   endif;
  41.  
  42.  
  43.   {check for <ESC>}
  44.   if (kbcode(1))
  45.     goto $out
  46.   endif;
  47.  
  48. goto $checkkeys
  49.  
  50. $out
  51. println("");
  52. println("out of here");
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.