I am trying to trap all keydown and keyup events on a windows form in c#. I used the following code which works PERFECT for keydown events, but doesn't seem to fire at all for keyup events:
if (msg.Msg == WM_KEYDOWN)
this.Text = "Keydown";
else if (msg.Msg == WM_KEYUP)
this.Text = "KeyUp";
And the keydown always fires fine, and the keyup never fires. I tried putting breakpoints in to verify and the keyup is simply never triggered. What am I doing wrong?