home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************
- FUNCTION SCANKEY
- *****************************************************************
-
- * Returns numeric ASCII equivalent and SCANCODE value for a key
-
- * Copyright(c) 1991 -- James Occhiogrosso
-
- LOCAL keypress := 0
-
- * Wait for a key and return its value
- keypress = FULLKEY()
-
- * Adjust value to a positive number
- keypress = IF(keypress < 0, keypress + 65536, keypress)
-
- IF TYPE('scancode') = 'N'
- scancode = INT(keypress/256)
- ENDIF
-
- * Return ASCII value
- RETURN INT(keypress % 256)
-
-