Who will map the scan code (inserted by VKD_Force_keys) to virtual key code?

Hello all,
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…

Thanks
Al


Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

No, the USER’s message queue contains raw scancodes.
Translation to ANSI (which is language-dependent for sure) is done in user32!TranslateMessage.

Max

----- Original Message -----
From: Allan B
To: NT Developers Interest List
Sent: Friday, February 22, 2002 3:02 AM
Subject: [ntdev] Who will map the scan code (inserted by VKD_Force_keys) to virtual key code?

Hello all,
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…

Thanks

Al


Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games — You are currently subscribed to ntdev as: xxxxx@storagecraft.com To unsubscribe send a blank email to %%email.unsub%%