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_GETSHIFTSTATE (1.2)
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_DOSDEVIOCTL
USHORT DosDevIOCtl(pbShiftState, 0L, 0x0073, 0x0004, hDevice)
PBYTE pbShiftState; /* pointer to structure for shift state */
HFILE hDevice; /* device handle */
The KBD_GETSHIFTSTATE function retrieves the shift state of the default
keyboard of the current screen group. The shift state identifies whether the
SHIFT, CTRL, ALT, INS, 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 receives 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 shift state is set by incoming keystrokes. It can also be set by using
the KBD_SETSHIFTSTATE function (0x0004, 0x0053).
See Also
DosOpen, KBD_SETSHIFTSTATE, SHIFTSTATE
♦