C Language and Libraries Help (clang.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.
_bios_keybrd Constants
◄Up► ◄Contents► ◄Index► ◄Back►
─────Run-Time Library───────────────────────────────────────────────────────
Constant: _KEYBRD_READ, _KEYBRD_READY, _KEYBRD_SHIFTSTATUS,
_NKEYBRD_READ, _NKEYBRD_READY, _NKEYBRD_SHIFTSTATUS
Include: <bios.h>
Context: _bios_keybrd
Summary: 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:
7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
│ │ │ │ │ │ │ │ │
└─┴─┴─┴─┴─┴─┴─┴─┘
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ └─ Right SHIFT key is down
│ │ │ │ │ │ └─── Left SHIFT key is down
│ │ │ │ │ └───── CTRL key is down
│ │ │ │ └─────── ALT key is down
│ │ │ └───────── SCROLL LOCK on
│ │ └─────────── NUM LOCK on
│ └───────────── CAPS LOCK on
└─────────────── INS on
The _NKEYBRD_SHIFTSTATUS uses the
low-order and also the high-order byte:
7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
│ │ │ │ │ │ │ │ │
└─┴─┴─┴─┴─┴─┴─┴─┘
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ └─ Left CTRL key is down
│ │ │ │ │ │ └─── Left ALT key is down
│ │ │ │ │ └───── Right CTRL key is down
│ │ │ │ └─────── Right ALT key is down
│ │ │ └───────── Scroll key is down
│ │ └─────────── NUM LOCK key is down
│ └───────────── CAPS LOCK key is down
└─────────────── SYSREQ key is down
See ◄SHIFT.H► for a list of keyboard
shift codes.
-♦-