NEXTKEY( )
Topic group Related topics Example
Checks for and returns a keystroke held in the keyboard typeahead buffer.
Syntax
NEXTKEY([<expN>])
<expN>
The position of the key or key combination in the typeahead buffer. If <expN> is omitted, NEXTKEY( ) returns the value of the first keystroke in the buffer. If <expN> is larger than the number of keystrokes in the buffer, NEXTKEY( ) returns 0.
Description
The keyboard typeahead buffer stores keystrokes the user enters while dBASE Plus is busy. A very fast typist may also fill the keyboard typeahead buffer—dBASE Plus is busy trying to keep up. These keystrokes are normally handled automatically; for example, characters are typed into entryfields and menu choices are made. Use NEXTKEY( ) to check if there are any buffered keystrokes, or to look for a keystroke in a specific position in the buffer.
NEXTKEY( ) returns the decimal value associated with the key or key combination held in the keyboard typeahead buffer at the specified position in the buffer. Unlike INKEY( ), NEXTKEY( ) does not remove the keystroke from the buffer. If the buffer is empty or there is no keystroke at the specified position, NEXTKEY( ) returns a value of zero.
For a list of keystroke values, see INKEY( ).