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

Re: Distinguish Home key from NumPad Home key? by Claes

Claes
Tue Sep 28 02:58:48 CDT 2004

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

"Jim Lin" <jlin@remember.com> wrote in message
news:uBNl2vKpEHA.1160@tk2msftngp13.phx.gbl...
> 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
>
>
>



Re: Distinguish Home key from NumPad Home key? by Jim

Jim
Tue Sep 28 09:53:53 CDT 2004

Many thanks, Claes! It works for me now :)

Jim



"Claes Bergefall" <claes.bergefall@online.nospam> wrote in message
news:%23N039DTpEHA.3724@TK2MSFTNGP10.phx.gbl...
> 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