ioctl12.hlp (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.
KBD_SETSHIFTSTATE (1.2)
                                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_DOSDEVIOCTL
 
USHORT DosDevIOCtl(0L, pbShiftState, 0x0053, 0x0004, hDevice)
PBYTE pbShiftState;    /* pointer to structure with shift state */
HFILE hDevice;         /* device handle                         */
 
The KBD_SETSHIFTSTATE function sets the shift state for the default keyboard
in the current screen group. The shift state identifies whether the SHIFT,
CONTROL, ALT, INSERT, and SYSREQ keys are up or down and whether the SCROLL
LOCK, NUMLOCK, CAPSLOCK, and INSERT modes are on.
 
Parameter     Description
────────────────────────────────────────────────────────────────────────────
 
pbShiftState  Points to the SHIFTSTATE structure that contains the shift
              state.
 
hDevice       Identifies the keyboard that receives the device-control
              function. The handle must have been created previously by
              using the DosOpen function.
 
Return Value
 
The return value is zero if the function is successful or an error value if
an error occurs.
 
Comments
 
The system puts the shift state into the character data record built for
each incoming keystroke; the shift state then can be used to interpret the
meaning of keystrokes. The function sets the shift state to the specified
state regardless of the state of the actual keys. The shift remains as set
until the user presses or releases the corresponding key.
 
The keyboard device driver maintains a shift state for each screen group.
 
See Also
 
DosOpen, KBD_GETSHIFTSTATE, SHIFTSTATE
 
                                      ♦