Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- GT_LIB v1.0 Reference Guide Release 1.0 - <b>modified inkey() that calls setkey procedures</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Modified inkey() that calls setkey procedures
------------------------------------------------------------------------------

 Syntax

         GT_INKEY(<nWait>) --> nKey

 Arguments:

       <nWait>  - how long to wait

 Returns:

       nKey     - a modified INKEY() value

 Description:

       Performs an inkey() and if there is an action block assigned
       to that key, it will evaluate the block and then negate the
       inkey() value.

       Returning a negative value for those keys that have had a
       set key block assigned is a little different to the way
       waitkey() works in Funcky but I find this information to
       be more useful.

 Examples:


       set key K_F1 to helpme()

       nVal := GT_inkey(0)

       if nVal < 0
          ? "A set key procedure was called"
       endif
       "Inkey value " + nVal


 Source: GT_INKEY.PRG

 Author:  Andy M Leighton

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