ReadKey()

READKEY()*

Determine which key terminated a READ.

Syntax

      READKEY() --> nKeyCode

Arguments

None.

Returns

READKEY() returns a numeric code representing the key that caused READ to terminate.

Description

READKEY() is used after a READ was terminated to determine the exit key pressed. If the GET buffer was updated during READ, 256 is added to the return code.

      Exit               Return code     Return code
      Key                (not updated)   (updated)
      ------------------ --------------  ----------------
      Up                    4            260
      Down                  5            261
      Page-Up               6            262
      Page-Down             7            263
      Ctrl Page-Up         34            290
      Ctrl Page-Down       35            291
      Esc                  12            268
      Ctrl End             14            270
      Enter                15            271
      Key >= 32            15            271
      otherwise             0            0

READKEY() is a compatibility function so try not to use it. READKEY() is superseded by LASTKEY() which returns the INKEY() code for that key. UPDATED() could be used to find if the GET buffer was changed during the READ.

Compliance

READKEY() is compliant with CA-Cl*pper 5.3

Files

Library is rtl

Seealso

@…GET, INKEY(), LASTKEY(), READ, READEXIT(), UPDATED()

3 responses to “ReadKey()

  1. Pingback: Harbour All Functions – R | Viva Clipper !

  2. Pingback: Harbour UI – Input Functions | Viva Clipper !

  3. Pingback: Harbour RG Summary | Viva Clipper !

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.