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.
_bios_keybrd Constants
◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
Constant: _KEYBRD_READ, _KEYBRD_READY, _KEYBRD_SHIFTSTATUS,
_NKEYBRD_READ, _NKEYBRD_READY, _NKEYBRD_SHIFTSTATUS
Include: <bios.h>
Context: _bios_keybrd
Synopsis: The <service> argument can be any one of the following
manifest constants:
Constant Meaning
_KEYBRD_READ, Reads the next character read from the
_NKEYBRD_READ keyboard. The _NKEYBRD_READ constant is
used with enhanced keyboards to obtain
the scan codes for function keys F11 and
F12 and the cursor control keys. If no
character has been typed, the call will
wait for one. If the low-order byte of
the return value is nonzero, it contains
the ASCII value of the character typed.
The high-order byte contains the keyboard
scan code for the character. See ◄SCAN.H►
for a list of keyboard scan codes.
_KEYBRD_READY, Checks to see whether a keystroke is
_NKEYBRD_READY waiting to be read and, if so, reads it.
The _NKEYBRD_READY constant is for use
with enhanced keyboards. The return value
is 0 if no keystroke is waiting;
otherwise, the return value is the
character waiting to be read, in the same
format as the _KEYBRD_READ or
_NKEYBRD_READ return. This service does
not remove the waiting character from the
input buffer, as does the _KEYBRD_READ or
_NKEYBRD_READ service.
_KEYBRD_SHIFTSTATUS, Returns the current shift-key (SHIFT)
_NKEYBRD_SHIFTSTATUS status. The _KEYBRD_SHIFTSTATUS uses only
the low-order byte of the return value.
See ◄SHIFT.H► for a list of keyboard
shift codes.
Any combination of the following status bits can be set:
Bit Meaning
00H Right SHIFT key pressed
01H Left SHIFT key pressed
02H Either CTRL key pressed
03H Either ALT key pressed
04H SCROLL LOCK on
05H NUM LOCK on
06H CAPS LOCK on
07H In insert mode (INS)
08H Left CTRL key pressed
09H Left ALT key pressed
0AH Right CTRL key pressed
0BH Right ALT key pressed
0CH SCROLL LOCK key pressed
0DH NUM LOCK key pressed
0EH CAPS LOCK key pressed
0FH SYS REQ key pressed