Virtual key code

I have two question :
1)Can i get a virtual key code of a key in kernel mode driver?if yes then
how?
2)can two key have same scan code on a keyboard?

Thanks in advance,
Regards,
-John


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

>2)can two key have same scan code on a keyboard?

Sure, if that’s how the hardware is designed. The original concept of scan
codes was to have a unique scan code for every physical key. Companies that
want to have slightly physical key configurations, who don’t want to write
a custom driver might have duplicates. Some would argue the hardware is
broken in this case, even though it generally “works”.

There use to be some DOS based programs that would dump out the exact scan
codes from the hardware when you pressed keys. You might run one and see
how YOUR hardware is.

  • Jan

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

Thanks Jan,
As you have written, it is possible that two key have
same scan code.
For an example character key ‘A’ and ‘B’ have same
scan code and virtual key code is not known at that
time. Now I want to spawn a process on key press ‘A’
and a different process on key ‘B’. but the scan codes
are same so how will I distinguished between both
keys? Whether ‘A’ pressed or ‘B’? How would you
resolve that problem?

Thanks in advance,
Regards
-John

— Jan Bottorff wrote: >
> >2)can two key have same scan code on a keyboard?
>
> Sure, if that’s how the hardware is designed. The
> original concept of scan
> codes was to have a unique scan code for every
> physical key. Companies that
> want to have slightly physical key configurations,
> who don’t want to write
> a custom driver might have duplicates. Some would
> argue the hardware is
> broken in this case, even though it generally
> “works”.
>
> There use to be some DOS based programs that would
> dump out the exact scan
> codes from the hardware when you pressed keys. You
> might run one and see
> how YOUR hardware is.
>
> - Jan
>
>
>
> —
> You are currently subscribed to ntdev as:
> xxxxx@yahoo.co.uk
> To unsubscribe send a blank email to
leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

__________________________________________________
Do You Yahoo!?
Everything you’ll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


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