Hi!
https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/dos/keyb/xkeyb/xkeyb-1994/XKEYB.TXT This seems one of those nifty keyboard drivers, but it has not time-critical functions
I was more thinking in the direction of MKEYB or other int 15.4f based drivers: They see all key press and key release events and are able to manipulate things before they return control to the BIOS keyboard routines. The idea is as follows: If the driver sees a key press event, it could record the current time (counter at 40:6c) and, if a temporary fake shift was active (see details below), deactivate it now. If the driver sees a key release event, it could check if the corresponding key press event was long enough ago. If yes, it could make the BIOS believe that SHIFT would have been active at the moment. The driver can set some flag for itself, so it knows to undo the fake later. Return to BIOS. To fake shifts, one can just modify the flags at 40:17 and 18. It will not update the keyboard LEDs, but that is acceptable. The BIOS itself uses 40:96 and 97 to track its own status. Of course the details can get a bit more complicated, as you also have press and release events for shift keys etc. and special E0 ... key combinations and so on. But if you are happy with just the most mainstream keys acting in that "long press means shift" style and only while no actual ctrl, shift, alt or similar modifier keys are pressed, it should be quite feasible to implement this. Note that you will also have to manipulate the autorepeat functionality of the keyboard or BIOS. For example our MODE CON RATE=... DELAY=... command shows how to do this. It just uses BIOS function int 16.0305, no low-level trick. You can also think of the driver keeping track of WHICH key is in progress of being pressed for longer, for extra control over the interaction of typematics and autoshift. Regards, Eric _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user