FT_LASTKEY

FT_LASTKEY()
 Force LastKey() to return a programmer-defined value.

 Syntax

     FT_LastKey( <nKey> ) -> NIL

 Arguments

    <nKey> is the Inkey() value of the desired key.

 Returns

    NIL

 Description

    It is occasionally useful to force LastKey() to return a known value.
    This is easily accomplishing by using the KEYBOARD command, but this
    has undesireable side effects (the keyboard buffer is cleared, and
    the keystroke is processed whether you needed it to be or not).  This
    function accomplishes the same task but without the side effects.  It
    does so by directly modifying the memory location where Clipper stores
    the LastKey() value.

    Some highly unorthodox programming techniques, not to mention rather
    strange use of Clipper internals, was necessary to make this function
    work.  If this makes you uncomfortable, then don't use this function,
    you worthless crybaby.

 Examples

    keyboard chr( K_ESC )

    ? lastkey()  // returns 27

    FT_LastKey( K_F1 )

    ? lastkey()  // now returns 28

 Source: SETLASTK.ASM

 Author: Ted Means

 

One response to “FT_LASTKEY

  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.