Harbour Reference Guide

 

NEXTKEY()

Get the next key code in the buffer without extracting it.

Syntax

NEXTKEY( [<nInputMask>] ) --> nKey

Arguments

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 Clipper-compatible key codes

Returns

<nKey> The value of the next key in the Harbour keyboard buffer.

Description

Returns the value of the next key in the Harbour keyboard buffer without extracting it.
Examples
      // 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 := "+"
      WHILE TRUE
         ?? cChar
         nKey := NEXTKEY()
         IF nKey == K_ESC
            EXIT
         ELSE
            IF nKey != 0
               cChar := CHR( nKey )
            END IF
         END IF
      END WHILE
Tests
      KEYBOARD "AB"; ? NEXTKEY(), NEXTKEY() ==>   65   65
Status

Ready

Compliance

NEXTKEY() is compliant with CA-Clipper 5.3, but has been extended for Harbour.

Files

Library is rtl

See Also

 




[Source Forge]

Other Docs Categories

Advantage Database RDD
Array
Binary conversion
Classes
Code Block
Console input
Conversion
Conversion Tools
DOS
Data input and output
Database
Database Tools
Date
Dos Tools
Environment
Error recovery
Events
File management
GT
Harbour Tools
Internal
Low Level
Math
Misc
Miscellaneous
Nation
Object manipulation
Operating System Specific
Parameter Checks
String Tools
Strings
TBrowse Method
TBrowse class
Terminal
Time
Utility
Variable Management

 

Last updated on 2001/07/30