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_PEEKCHAR (1.2)
                                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_DOSDEVIOCTL
 
USHORT DosDevIOCtl(pkkiBuffer, pusStatus, 0x0075, 0x0004, hDevice)
PKBDKEYINFO pkkiBuffer;    /* pointer to structure for keystroke */
PUSHORT pusStatus;         /* pointer to variable for status     */
HFILE hDevice;             /* device handle                      */
 
The KBD_PEEKCHAR function retrieves one character data record from the head
of the keyboard-input buffer of the screen group of the active process. The
character data record is not removed from the keyboard-input buffer.
 
Parameter   Description
────────────────────────────────────────────────────────────────────────────
 
pkkiBuffer  Points to the KBDKEYINFO structure that contains keyboard
            input.
 
pusStatus   Points to the variable that receives the keyboard status. It can
            be one or both of the following values:
 
            Value              Meaning
            ────────────────────────────────────────────────────────────────
            KBD_DATA_RECEIVED  Character data record is retrieved. If not
                               set, no character data was retrieved.
 
            KBD_DATA_BINARY    Input mode is binary. If not set, input mode
                               is ASCII.
 
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
 
If the shift-reporting input mode is enabled, the keystroke information
retrieved may specify only a shift-state change and no character input.
 
See Also
 
DosOpen, KBD_READCHAR, KBDKEYINFO