Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>kbdstat()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 KBDSTAT()
 Tests for key shift state status, such as Ctrl and Shift
------------------------------------------------------------------------------
 Syntax

     KBDSTAT() --> nKeyStatus

 Returns

     KBDSTAT() returns a numeric code that corresponds to the status of
     certain keys.

 Description

     This function determines the status of all shift state keys (e.g., Ctrl,
     Shift or Alt, Scroll-Lock or Num-Lock).  The information KDBSTAT()
     returns depends on the keyboard itself.

     Table 13-5: Applies to all Keyboards
     ------------------------------------------------------------------------
     Bit     Key
     ------------------------------------------------------------------------
     1       Right shift currently pressed
     2       Left shift currently pressed
     3       Ctrl currently pressed (left or right)
     4       Alt currently pressed (Alt or Shift-Alt)
     5       Scroll-Lock ON/OFF
     6       Num-Lock ON/OFF
     7       Caps-Lock ON/OFF
     8       Insert ON/OFF
     ------------------------------------------------------------------------

 Note

     .  Since KBDSTAT() depends on the type of keyboard, use KBDTYPE()
        to determine whether or not the left and right Ctrl or Alt keys are
        valid return values.

 Example

     This example tests the Alt key.  You could use it to display an
     additional prompt menu when the Alt key is depressed:

     IF ISBIT(KBSTAT(), 4)
        * . . .
     ENDIF


See Also: KBDTYPE() KBDDISABLE() KBDSPEED()

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