home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a009 / 6.ddi / SAMPLE.LIF / KEYBOARD.PRG < prev    next >
Encoding:
Text File  |  1991-04-14  |  504 b   |  27 lines

  1. /***
  2. *  Keyboard.prg
  3. *  Sample keyboard routines.
  4. *  Copyright (c) Nantucket Corporation, 1990.  All rights reserved.
  5. *  Craig Ogg
  6. *
  7. *  Note: Compile with /N/W options
  8. */
  9.  
  10. /***
  11. *  InKeyWait( <nSecs> ) --> nInkeyCode
  12. *  Similar to INKEY(), except services SET KEYs
  13. *
  14. */
  15. FUNCTION InKeyWait( nSecs )
  16.    LOCAL nKey
  17.    LOCAL bKeyBlock
  18.  
  19.    nKey := INKEY( nSecs )
  20.  
  21.    IF (bKeyBlock := SETKEY(nKey)) != NIL 
  22.       EVAL(bKeyBlock, PROCNAME(2), PROCLINE(2))
  23.    ENDIF
  24.  
  25.    RETURN( nKey )
  26.  
  27.