Hi Tom,

> I am trying to emulate a keystroke programmatically under FreeDOS. 
> The problem is that I need to make it work for *anything* that uses
> the keyboard. So far the attempts I've made (one using INT 16 with
> AH=5 to store a keystroke in the keyboard buffer, and one using

That sounds reasonable.

> outportb) only work for some of the applications I have subsequently
> run. I'm looking to hook into the lowest possible option, that

For which apps did it work and for which not?

> anything that wants to use the keyboard has to go through, regardless
> of their implementation.

Then you have to program the keyboard controller to fake keypresses.

Of if even that fails, you could use protected mode so your driver
would pretend to BE a keyboard controller - sometimes forwarding I/O
to the real controller, sometimes just sending your fake keypresses.
Protected mode allows you to trap port I/O attempts and emulate them.

The lowest level keyboard I/O that I have seen yet were games which
installed their own INT 9 (IRQ 1) handler and did direct I/O with a
keyboard controller. Some of those would also run in protected mode,
possibly disabling other IRQ handlers such as a timer tick or similar
handler that you may have installed to send the fake keystrokes...

> My current idea is trying to replace the keyboard driver with one of
> my own. Do you think that would work? If so, where can I find an
> open-source keyboard driver I can alter, and how do I install it when
> I'm done?

All FreeDOS keyboard drivers are open source - KEYB, XKEYB, MKEYB...
You could also have a look at JEMM386 / JEMMEX based "JLM" drivers,
Bret Johnson's (or Georg Potthast's) USB drivers or similar :-)

Eric



------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to