send function keys to a legacy DOS program

Alexander Gattin xrgtn at yandex.ru
Sat Mar 19 18:52:28 EDT 2011


Hello,

On Thu, Mar 10, 2011 at 04:58:53PM -0800, Justin
Ezequiel wrote:
> We have an old barcode program (MSDOS and source code unavailable.)
> I've figured out how to populate the fields (by hacking into one of
> the program's resource files.)
> However, we still need to hit the following function keys in sequence.
> F5, F2, F7
> Is there a way to pipe said keys into the program?

It's a very old and good known trick IMO. You just
need to write keycodes to kbd ring buffer in BIOS
data area (I don't remember exact address,
soemewhere in 1st 4kbytes of PC memory), then wait
till the scancode gets consumed. I'd put "scancode
feeding" code into timer interrupt handler.

-- 
With best regards,
xrgtn



More information about the Python-list mailing list