Wait for keypress and return keyboard scan code


      FT_SCANCODE() -> cCode




     A two-character string, corresponding to the keyboard scan code.


     FT_SCANCODE() enables you to distinguish the different scancodes
     of similar keys (such as Grey minus versus regular minus), thus
     increasing the number of keys your input routine can recognize.

     It works like INKEY(), in that it waits for a key to be pressed.
     The scan code consists of two bytes, which are returned as a
     two-character string.

     For example, calling FT_SCANCODE() and pressing the Grey-minus
     key will return a two character string:

            CHR(45) + CHR(74)

     LASTKEY() is not updated by FT_SCANCODE(), so don't try to
     test LASTKEY() to see what was pressed during an FT_SCANCODE()
     call.  Simply assign the return value to a variable and test
     that (see the test driver below).

     *  This was adapted from a short C routine posted by John Kaster on
        NANFORUM.  It was written in Clipper to help demonstrate the
        FT_INT86 function of the Nanforum Toolkit.

     This program requires FT_INT86().


        cKey := FT_SCANCODE()

      [grey-] returns:  CHR(45) + CHR(74)
      [-]     returns:  CHR(45) + CHR(12)
      [grey+] returns:  CHR(43) + CHR(78)
      [+]     returns:  CHR(43) + CHR(13)


 Author: Glenn Scott (from John Kaster)


One response to “FT_SCANCODE

  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.