Button Capture with No KEYUP

  • Thread starter Thread starter joe.radjavitch
  • Start date Start date
J

joe.radjavitch

Hello,
I have a .NET CF Application where I am trying to capture the PTT
press and release for a WM6 device (Treo Pro and AT&T Tilt).

I have WndProc defined in my form and I put a breakpoint when I
switch
on the message.

When I press and hold the PTT buttton, I receive the following
messages:

msg: 0xD (WM_GETTEXT)
wParam: 0xID

then:
msg: 0x101 (WM_KEYUP)
wParam: 0xc6

When I release the PTT button, I receive the following messages:
msg: 0xD (WM_GETTEXT)
wParam: 0x1D

Why am I getting an WM_KEYUP when the button is still pressed?

Thanks,
JR
 
This is the way that most of the hardware keys are implemented - they don't
generate separate keydown/keyup events. You'll find also that devices where
a single button has two functions e.g. short press and long press that a
long press will result in a single keyup event for the secondary function.

Peter
 
Back
Top