msos2.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
KBDINFO (1.2)
Changes                                             Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_KBD
 
typedef struct _KBDINFO {    /* kbst */
    USHORT cb;
    USHORT fsMask;
    USHORT chTurnAround;
    USHORT fsInterim;
    USHORT fsState;
} KBDINFO;
 
The KBDINFO structure contains status information for a logical keyboard.
 
Field         Description
────────────────────────────────────────────────────────────────────────────
 
cb            Specifies the size of the structure (in bytes). Programs
              written in the C language should use the sizeof operator to
              set this field.
 
fsMask        Specifies the current keyboard modes. It can be a combination
              of the following values:
 
              Value                       Meaning
              ──────────────────────────────────────────────────────────────
              KEYBOARD_ECHO_ON            Echo mode turned on.
 
              KEYBOARD_ECHO_OFF           Echo mode turned off.
 
              KEYBOARD_BINARY_MODE        Binary mode turned on.
 
              KEYBOARD_ASCII_MODE         ASCII mode turned on.
 
              KEYBOARD_MODIFY_STATE       The fsState field is to be
                                          modified. Applies to the
                                          KbdSetStatus function only.
 
              KEYBOARD_MODIFY_INTERIM     The fsInterim field is to be
                                          modified. Applies to the
                                          KbdSetStatus function only.
 
              KEYBOARD_MODIFY_TURNAROUND  The chTurnAround field is to be
                                          modified. Applies to the
                                          KbdSetStatus function only.
 
              KEYBOARD_2B_TURNAROUND      Two-byte turn-around character. If
                                          not given, the turn-around
                                          character is one byte.
 
              KEYBOARD_SHIFT_REPORT       Shift reporting turned on.
 
              Note that echo mode is either turned on or off. Only one input
              mode, binary or ASCII, can be turned on at any given time.
 
chTurnAround  Specifies the turn-around character. If this field value
              includes 0x0080, the character is two-bytes packed in the low
              and high bytes of this field. Otherwise, the character is a
              single byte in the low byte.
 
fsInterim     Specifies the interim character flags. If this field is
              0x0020, the program has requested character conversion. If it
              is 0x0080, the interim character flag is on.
 
fsState       Specifies the state of the shift keys. It can be any
              combination of the following values:
 
              Value                 Meaning
              ──────────────────────────────────────────────────────────────
              KBDSTF_RIGHTSHIFT     Right SHIFT key down.
 
              KBDSTF_LEFTSHIFT      Left SHIFT key down.
 
              KBDSTF_CONTROL        CTRL key down.
 
              KBDSTF_ALT            ALT key down.
 
              KBDSTF_SCROLLLOCK_ON  SCROLL LOCK mode turned on.
 
              KBDSTF_NUMLOCK_ON     NUMLOCK mode turned on.
 
              KBDSTF_CAPSLOCK_ON    CAPSLOCK mode turned on.
 
              KBDSTF_INSERT_ON      INS mode turned on.
 
See Also
 
KbdGetStatus, KbdSetStatus