Go to the first, previous, next, last section, table of contents.
#include <bios.h> int bioskey(int command)
This function issues the BIOS keyboard interrupt 16h with command in the AH register, and returns the results of that call. The argument command can accept the following values:
7654 3210 Meaning ---- ---X Right shift key down ---- --X- Left shift key down ---- -X-- Ctrl key down ---- X--- Alt key down ---X ---- Scroll lock on --X- ---- Num lock on -X-- ---- Caps lock on X--- ---- Insert on
E0h
prefix in the low 8 bits.
Almost every PC nowadays has an extended 101-key keyboard.
FEDC BA98 7654 3210 Meaning ---- ---- ---- ---X Right SHIFT is pressed ---- ---- ---- --X- Left SHIFT is pressed ---- ---- ---- -X-- CTRL is pressed ---- ---- ---- X--- ALT is pressed ---- ---- ---X ---- Scroll Lock locked ---- ---- --X- ---- Num Lock locked ---- ---- -X-- ---- Caps Lock locked ---- ---- X--- ---- Insert locked ---- ---X ---- ---- Left CTRL is pressed ---- --X- ---- ---- Left ALT is pressed ---- -X-- ---- ---- Right CTRL is pressed ---- X--- ---- ---- Right ALT is pressed ---X ---- ---- ---- Scroll Lock is pressed --X- ---- ---- ---- Num Lock is pressed -X-- ---- ---- ---- Caps Lock is pressed X--- ---- ---- ---- SysReq is pressed
Depends on command.
not ANSI, not POSIX
while (!bioskey(1)) do_stuff();
Go to the first, previous, next, last section, table of contents.