Replacement for INKEY() that tests for SET KEY procedures


      FT_SINKEY( [ <nWaitTime> ] ) -> nKey


     <nWaitTime> is the number of seconds to wait.  If zero,
     FT_SINKEY() will wait indefinitely for a keypress.  If not
     passed, FT_SINKEY() does not wait for a keypress.  If NIL,
     it is treated the same as 0.


     The INKEY() value of the key pressed.


     FT_SINKEY() is similar to the function provided by Nantucket in
     KEYBOARD.PRG, with one significant difference: you can pass NIL
     to INKEY(), which will be treated as a zero (i.e., wait indefinitely
     for keypress).  Therefore, it is necessary to differentiate between
     an explicit NIL and one that is a result of a formal parameter NOT
     being received.

     FT_SINKEY() differs from the standard INKEY() in that it will
     respond to any keys set with SET KEY TO or SetKey().


     SetKey( K_F1, {|n,l,r| Help(n,l,r) } )
     nKey := FT_SINKEY(0)       // Help() will be called if F1 pressed


 Author: Greg Lief


One response to “FT_SINKEY

  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.