[<<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()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson