NEXTKEY()

From Recital Documentation Wiki
Revision as of 10:56, 23 March 2009 by Yvonnemilne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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