delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/27/03:00:11

Date: Wed, 27 Aug 1997 09:59:46 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Levien van Zon <lvzon AT bio DOT vu DOT nl>
cc: djgpp AT delorie DOT com
Subject: Re: Keyboard buffer
In-Reply-To: <5tf6td$c70@balaena.bio.vu.nl>
Message-ID: <Pine.SUN.3.91.970827095918.7942F-100000@is>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019