Links are not active on this page.
 READKEY( ) Function

Included for backward compatibility with READ. Use the Form Designer instead of READ.

This function is undocumented in the original VFP9 help file,
but the following documentation was found in the FoxPro for Windows 2.6 help, and may still be valid:

Returns a value corresponding to the key pressed to exit certain editing commands, or a value indicating how the last READ was terminated.

READKEY([expN])

Expand imageReturn Value

Return value - Numeric

Expand imageRemarks


If READKEY() is issued without the optional numeric expression expN, the value returned represents the key pressed to exit from these editing commands: APPEND, BROWSE, CHANGE, CREATE, EDIT, INSERT, MODIFY and READ.

An integer between 0 and 36, or between 256 and 292, is returned. The value returned is between 0 and 36 if the data was not modified. The value returned is between 256 and 292 if the data was modified.

Values Returned by READKEY

Key(s) No Update Update Meaning
  Code  Code
------ --------- ------ -------

Backspace
Left Arrow 0 256 Back 1
Ctrl+H       char.
Ctrl+S      

Expand imageSee Also