NEXTKEY()
From Recital Documentation Wiki
Revision as of 17:22, 3 December 2009 by Helengeorge (Talk | contribs)
Purpose
Function to return the integer numeric value of a key press
Syntax
NEXTKEY()
See Also
INKEY(), LASTKEY(), ON ESCAPE, ON KEY, READKEY(), SET KEY, SET PCKEYS, SLEEP
Description
The NEXTKEY() function returns an integer numeric value for the next key pressed at the keyboard, without removing it from the keyboard buffer. The command SET PCKEYS is used to change to return value of the NEXTKEY() function. When SET PCKEYS is OFF, the NEXTKEY() function returns the ASCII code for the key that was pressed. When SET PCKEYS is ON, the NEXTKEY() function returns the IBM PC keyboard value of the key that was pressed. If no key is pressed, the NEXTKEY() function returns 0.
Example
do while nextkey()=0 @0,68 say ampm() sleep 2 enddo
Products
Recital