Jump to content
  • Advertisement
Sign in to follow this  
gerbenvv

VK_ESCAPE key messages without being pressed

This topic is 3987 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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!)

Share this post


Link to post
Share on other sites
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. :-|

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!