Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Clipper Tools One Guide - <b>keysend()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
KEYSEND()

Syntax:     KEYSEND(<expC>)

Arguments:  <expC> is the string of key codes to be placed in the
            keyboard buffer.

Returns:    A logical value.
            True (.T.) if the function worked.  False (.F.) if any errors
            occurred.

Usage:      KEYSEND() operates in a similar manner to the Clipper
            command KEYBOARD, uses a different code for the
            character to be placed in the keyboard buffer (see Appendix
            A:Key codes).  By using this inherent coding of the
            character in the keyboard buffer, it is possible to use
            KEYSEND() to place those keys in the buffer which cannot
            be placed with Clipper KEYBOARD command, namely the
            keys that have a code of less than 0 or greater than 255 (for
            example, all function keys and most Alt combinations).

            The same applies to two keys that have the same Clipper
            INKEY() value and hence cannot normally be distinguished.
            It is better to use the Clipper command KEYBOARD if you
            must store normal keys such as letters and numbers in the
            keyboard buffer.  There will be no advantage in using
            KEYSEND() in this case.  However, you should use
            KEYSEND(), if you must simulate other keyboard inputs, e.g.,
            function and control keys, since it is possible to distinguish
            all function and control keys clearly.

Note:       The codes of the functions KEYREAD() and KEYSEND() are
            identical.  The maximum length of a string to be placed in
            the keyboard buffer can be determined via the function
            DSETTYPE().  This returns the length for DSETTYPE()*2, as
            DSETTYPE() will return the length of the TYPEAHEAD buffer
            in characters.  Each character in this buffer consists of two
            Bytes.  The function KEYSEND() will write these bytes in the
            buffer not the character.  The buffer is therefore 32 bytes
            long for 16 characters.

Library:    CT1.LIB


--------------------------------- Example ------------------------------

Examples:   * The function key Alt-F10 should  be simulated.
            *
            KEYSEND(CHR(113) + CHR(1))



See Also: DSETTYPE() KEYREAD()

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