Get the next key code in the buffer without extracting it.
NEXTKEY( [<nInputMask>] ) --> nKey
nInputMask is an optional integer value composed of one or more INKEY_ or HB_INKEY_ constants. The sole purpose of this argument is to allow switching between using HB_INKEY_EXTENDED key codes and using the normal CA-Cl*pper-compatible key codes
<nKey> The value of the next key in the Harbour keyboard buffer.
Returns the value of the next key in the Harbour keyboard buffer without extracting it.
// Use NEXTKEY() with INKEY() to change display characters, or by // itself to exit the loop, so that the caller can detect the Esc. LOCAL nKey, cChar := "+" DO WHILE .T. ?? cChar nKey := NextKey() IF nKey == K_ESC EXIT ELSE IF nKey != 0 cChar := Chr( nKey ) ENDIF ENDIF ENDDO
KEYBOARD "AB"; ? NEXTKEY(), NEXTKEY() ==> 65 65
NEXTKEY() is compliant with CA-Cl*pper 5.3, but has been extended for Harbour.
Library is rtl