Who will map the scan code (inserted by VKD_Force_keys) to virtual key code?
We have stripped down version of Windows 95. We are using a handheld device which communicated thro’ serial port. 95 based driver has been developed for handling serial communication and keyboard.
When some key is pressed on handheld device and driver maps( seems like mapping) scan code to virtual key code. As per my knowledge,( and as per MSDN) driver maps the scan code to virtual key code and places in message queue. And from where active application picks the key code. This scenario seems to be working perfectly in our system.
In the mean time, application sends DeviceIoControl call to stuff some scan code. In the handler routine of driver, VKD_Force_keys function is called. The description says “Forces scan codes into the keyboard buffer just as if they had been typed on the physical keyboard”.
My questions are,
What is difference between message queue and keyboard buffer? Who will map the scan code (inserted by VKD_Force_keys) to virtual key code?
What happens if I insert the scan code only for press and not for release of same key? For example, insert scan code for “Press A” and physically pressing some key from hand held device. Will 95 thinks that A has pressed, since scan code for “Release A” is not pressed?
Thanks for reading my mail patiently.. I would appreciate if you could give me pointers and inputs..