home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgramD2.iso
/
Database
/
CLIPR503.W96
/
KEYBOARD.PR_
/
KEYBOARD.PR
Wrap
Text File
|
1995-06-20
|
633b
|
34 lines
/***
*
* Keyboard.prg
*
* Sample keyboard routines
*
* Copyright (c) 1993-1995, Computer Associates International Inc.
* All rights reserved.
*
* Note: Compile with /N /W options
*
*/
/***
*
* InKeyWait( <nSecs> ) --> nInkeyCode
*
* Similar to INKEY(), except services SET KEYs
*
*/
FUNCTION InKeyWait( nSecs )
LOCAL nKey // INKEY() value to return
LOCAL bKeyBlock // Code block retrieved and performed for nKey, if any
nKey := INKEY( nSecs )
IF ( bKeyBlock := SETKEY( nKey ) ) != NIL
EVAL( bKeyBlock, PROCNAME( 2 ), PROCLINE( 2 ) )
ENDIF
RETURN( nKey )