Hi all,
Does anyone know if it is possible to distinguish between a user
pressing the dedicated Home key versus the Home key on the number pad
(NumPad 7 with NumLock off)? I'm working in VB.NET on WinXP Pro. The
standard KeyPress/Down/Up events return identical key codes. I've tried the
API GetKeyboardState call and I've even tried keyboard hooks as described in
http://www.developer.com/net/net/article.php/11087_2193301_1/
I'm able to accurately determine state of the NumLock key, but NumPad 7 with
the NumLock off appears to generate the same key code as the dedicated Home
key. Has anyone had any experience in this area? I've been looking at this
issue for a while, so it's possible I'm overlooking something simple :)
Thanks,
Jim
Claes Bergefall - 28 Sep 2004 08:58 GMT
Handle WM_KEYDOWN and check the extended-key flag (bit
24 in the lParam parameter). It is 0 for the Home key on the number
pad and 1 for the other one
/claes
> Hi all,
> Does anyone know if it is possible to distinguish between a user
[quoted text clipped - 11 lines]
> Thanks,
> Jim
Jim Lin - 28 Sep 2004 15:53 GMT
Many thanks, Claes! It works for me now :)
Jim
> Handle WM_KEYDOWN and check the extended-key flag (bit
> 24 in the lParam parameter). It is 0 for the Home key on the number
> pad and 1 for the other one
>
> /claes