Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>keyread()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 KEYREAD()
 Reads already processed CA-Clipper keyboard buffer input
------------------------------------------------------------------------------
 Syntax

     KEYREAD() --> cKeyValue

 Returns

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

 Description

     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.

 Notes

     .  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.

 Example

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


See Also: KEYSEND() DSETTYPE()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson