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_scancode()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FT_SCANCODE()
 Wait for keypress and return keyboard scan code
------------------------------------------------------------------------------

 Syntax

      FT_SCANCODE() -> cCode

 Arguments

     None

 Returns

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

 Description

     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().

 Examples

        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)

 Source: SCANCODE.PRG

 Author: Glenn Scott (from John Kaster)

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