Difference between revisions of "NEXTKEY()"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 32: Line 32:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:Keyboard Events]]
 +
[[Category:Keyboard Events Functions]]

Revision as of 13:46, 3 June 2009

Class

Keyboard Events


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 Mirage Server, Recital Terminal Developer