Stuff a keystroke into the keyboard buffer


     FT_PUTKEY( <nKeyValue> ) -> lResult


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


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


   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.


     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


 Author: Ted Means


One response to “FT_PUTKEY

  1. Pingback: FT Keyboard-Mouse | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.