Mail Archives: djgpp/1997/08/27/03:00:11
On 20 Aug 1997, Levien van Zon wrote:
> Does anyone know how I can simulate a keypress using DJGPP?
> I could try writing the scan- + ASCIIcode word into the keyboard buffer,
> if I knew where it was located and how to write to it...
Use the library function `__dpmi_int' to call function 5 of the BIOS
interrupt 16h. The following is from ralf Brown's Interrupt List:
INT 16 - KEYBOARD - STORE KEYSTROKE IN KEYBOARD BUFFER (AT/PS w enh keybd only)
AH = 05h
CH = BIOS scan code
CL = ASCII character
Return: AL = status
00h if successful
01h if keyboard buffer full
AH destroyed by many BIOSes
Notes: under DESQview, a number of "keystrokes" invoke specific
DESQview-related actions when they are read from the keyboard
buffer (see #0500)
similarly, some "keystrokes" invoke special functions on the HP 100LX
and HP 200LX (see #0501)
- Raw text -