Google
 
Web ppczone.net

View Full Version : WM_KEYDOWN: wParam always 0x84 - why ?


Tal
07-04-2008, 10:49 AM
My program shows what button was pressed. On the emulator it works
fine but on my device (HTC Wizard) not:

When I press one of the up-down-left-right buttons, I always get same
results:
on WM_KEYDOWN message, wParam always equals to 0x84 !

How can I distinguish between left-right-up-down ?

Thanx in advance.

Saju
07-06-2008, 06:18 PM
Maybe you should look on the corresponding WM_KEYUP message wParam as well !


"Tal" <TalGamma@gmail.com>
> My program shows what button was pressed. On the emulator it works
> fine but on my device (HTC Wizard) not:
>
> When I press one of the up-down-left-right buttons, I always get same
> results:
> on WM_KEYDOWN message, wParam always equals to 0x84 !
>
> How can I distinguish between left-right-up-down ?
>
> Thanx in advance.

Scott Seligman
07-06-2008, 08:33 PM
Tal <TalGamma@gmail.com> wrote:
>My program shows what button was pressed. On the emulator it works
>fine but on my device (HTC Wizard) not:
>
>When I press one of the up-down-left-right buttons, I always get same
>results:
>on WM_KEYDOWN message, wParam always equals to 0x84 !

Is that the only WM_KEYDOWN message you're seeing?

0x84 is VK_DPAD, which should be sent before the actual key press to
indicate it's from the d-pad.

--
--------- Scott Seligman <scott at <firstname> and michelle dot net> ---------
Usenet is a great way of being annoyed by people I otherwise never
would have met.
-- Punk Walrus

Tal
07-07-2008, 02:05 PM
On Jul 7, 3:33 am, "Scott Seligman" <selig...@example.com> wrote:
> Tal <TalGa...@gmail.com> wrote:
> >My program shows what button was pressed. On the emulator it works
> >fine but on my device (HTC Wizard) not:
>
> >When I press one of the up-down-left-right buttons, I always get same
> >results:
> >on WM_KEYDOWN message, wParam always equals to 0x84 !
>
> Is that the only WM_KEYDOWN message you're seeing?
>
> 0x84 is VK_DPAD, which should be sent before the actual key press to
> indicate it's from the d-pad.
>
> --
> --------- Scott Seligman <scott at <firstname> and michelle dot net> ---------
> Usenet is a great way of being annoyed by people I otherwise never
> would have met.
> -- Punk Walrus

Thanks for your responses. I'll check if WM_KEYDOWN is the only
message or I miss something...

Robert Scott
07-07-2008, 02:46 PM
FYI, I also use only WM_KEYDOWN and wparam to pick up Right and Left, and it
seems to be working fine on a wide variety of Pocket PCs.
Robert Scott
Ypsilanti, Michigan