Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

In reply to : Bret 'll have to hate FreeDOS mKEYB, too (Developers)

posted by tom Homepage, Germany (West), 17.05.2011, 19:47

> > as already said: I'm not able to follow your reasoning; why exactly
> should
> > it not call INT 16.5 (besides common DOS/BIOS reentrancy problems)
>
> The reason is because if you call INT 16.5, or modify anything in the BDA,
> or anything like that, but the INT 15.4F did not come from inside the INT
> 09 handler, you will be "typing" something that didn't actually come from
> the keyboard.
in our case (we are a keyboard driver) the scancode (most likely) comes from the keyboard.

even if 'something' is simulating a keyboard by sending scancodes into
the system by callimg int15.4f, usually the intension is to enter characters into the keyboard buffer.

if this something is sending CtrlAltDel scancodes, it's either an annoyance
or a remote control program - the system will boot anyway.

> As I alluded to earlier, the reason I'm so concerned about this issue is
> because of virtual keyboards, like USB. I have several of these kinds of
> programs
I m not sure, but I guess that sending the scancodes using int15.4f should just work.

I haven't looked at your code, but they should probably send scancodes
using int15.4f. (even better would be to use SMM and simulate a real PS/2
keyboard, but this is beyond tyhe current scope). your driver should handle
the keyboard, and let the scancode->key translation to the keyboard driver.

> and I sometimes try to make them automatically "sense" the
> current keyboard
is there any way to determine the keyboard layout ?

> Based on everything I've seen from MS, the scancode-to-ASCII "translation"
> is supposed to occur completely inside the INT 09 handler. The purpose of
> INT 15.4F is simply to allow the user to move keys around on the keyboard
> (e.g., switching where the Ctl and CapsLock keys are located), not to
> actually manipulate what the keys do.
I doubt that. int16.5 was exactly created to enter keys into the keyboard buffer; no reason not to use it.

just one point: how should the international keyboard driver enter Ä Ö Ü and accented stuff into the keyboard buffer ?
int16.5 was created exctly for this purpose.

 

Complete thread:

Back to the forum
Board view  Mix view
22756 Postings in 2121 Threads, 402 registered users (1 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum