VK_ESCAPE key messages without being pressed
Hi,
In my message pump I get WM_KEYUP messages with the VK_ESCAPE key as the wparam. The thing is, when I get those I didn't release the escape key at all! When I do release the key I get them too. (As expected)
So I tried to see the difference between a real key release and a fake one and discovered that of the lparam the 24th bit is set when it was a fake release. MSDN says this about it:
24 - Specifies whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0.
http://msdn2.microsoft.com/en-us/library/ms646281.aspx
So why do I get these messages, what are extended keys and why do other programs not get them?
Thanks,
Gerben
The escape key is sent routinely through the message loop as a command notification with an id of IDCANCEL, which the IsDialogMessage provides keyboard handling to by default. I think the tab key also does this.
Anyway, it's normal -- I believe.... (correct me if I'm wrong!)
Anyway, it's normal -- I believe.... (correct me if I'm wrong!)
Yeah, but I don't have a dialogue window. It's an openGL game. And sometimes it gets escape key releases (no WM_KEYDOWN is send). I've discovered that on other keyboards I don't get these key messages. I think other programs do get the key releases, but only check for key down's. I also get 0xFF (reserved) WM_KEYDOWN's, of which I don't get WM_KEYUP's, really weird.
I should never have bought a microsoft keyboard. :-|
I should never have bought a microsoft keyboard. :-|
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement