Reads already processed CA-Clipper keyboard buffer input

     KEYREAD() --> cKeyValue


     The returned string contains the characters from the CA-Clipper keyboard
     buffer that have already been read and processed by the program.


     With KEYREAD() you can read the keys that have already been processed by
     your application from the keyboard buffer.  KEYREAD() offers the
     possibility of "looking into the past" of the current program execution
     so you can determine what the user has done up to that point.  This
     gives you the ability to repeat particular actions, perform and undo
     functions, or build keyboard macros.  KEYREAD() can also be very useful
     in searching for errors.


       All the keys processed since the last execution of SET
        TYPEAHEAD TO or KEYSEND() are placed in the keyboard buffer.
        Characters already in the buffer, but not yet read by a CA-Clipper
        program through an input instruction, are ignored by KEYREAD().  If
        the keyboard buffer is empty (as at program start, or after executing
        a KEYSEND() or SET TYPEAHEAD TO), the function returns a null string.

       In contrast to the Clipper release form the Summer of 1987,
        KEYREAD() in CA-Clipper returns the entire BIOS key code as defined
        in the CTSCAN.CH include file.  If complete key code compatibility is
        required for an existing application, the CT.CH include file must be
        included.  The CTSCAN.CH file also contains information regarding new
        keyboard function behavior.


     cHistory   :=  KEYREAD()                  // Prior input
     IF RIGHT(cHistory, 2) == cSequence
        ? "You have left MEMOEDIT using Ctrl-END!"

 To download this example - click here.