Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Nanforum Toolkit v2.1 Reference Guide - <b>ft_putkey()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FT_PUTKEY()
 Stuff a keystroke into the keyboard buffer
------------------------------------------------------------------------------

 Syntax

     FT_PUTKEY( <nKeyValue> ) -> lResult

 Arguments

    <nKeyValue> is the INKEY() value of the keystroke to be stuffed.

 Returns

   .T. if the keystroke was put into the keyboard buffer.
   .F. if nKeyValue was invalid or the buffer was full.

 Description

   This function is similar to the KEYBOARD command, with a few
   exceptions. First, this function does not clear the keyboard buffer
   before inserting the keystroke.  In addition, since it uses the
   Inkey() value, you can stuff any key, including function keys, into
   the keyboard buffer. However, this also means that unlike the KEYBOARD
   command, you can only stuff one keystroke at a time.

   You can easily create a User-Defined Command that makes this function
   even more like the KEYBOARD command.  For example,

       #command KEYSTROKE <key> => FT_PUTKEY( <key> )

   will create a command called KEYSTROKE that could be used as a
   companion command to KEYBOARD.  The only difference is that it would
   insert a single keystroke instead of a string.

   Be aware that this function makes use of Clipper's internal event
   handler.  If you don't like using internals, then don't use this
   function, you sniveling coward.

   This function is written to adhere to Turbo Assembler's IDEAL mode.
   To use another assembler, rearrange the SEGMENT and PROC directives
   and make any other necessary changes to the source code.

 Examples

     FT_PUTKEY( -9 )   //  Stuff the F10 key
     FT_PUTKEY( 276 )  //  Stuff the Alt T key
     KEYSTROKE 28      //  Stuff the F1 key using a User-Defined Command

 Source: PUTKEY.ASM

 Author: Ted Means

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