Quote:
Originally Posted by The Fifth Horseman
Thank you, that helped. ![Smile](http://www.abandonia.com/vbullet/images/smilies/generic/smile)
It seems I'm going to have to keep GetAsyncKeyState for one special case, namely the right ALT button. It returns the Left CTRL scancode when pressed, and I can only determine it's that button by checking GetAsyncKeyState.
|
You're welcome.
As to the "special case", you don't need to keep GetAsyncKeyState just for that. The left and right ALT keys have their own keycodes defined, known respectively as VK_LMENU and VK_RMENU. Have you tried those?
Also, IIRC, the RALT = LCTRL problem occurs usually when a non-US (or maybe non-English?) keyboard layout is set in the OS. Just for kicks, try out how your program works with US keyboard layout set (instead of Polish, which I presume is the case with you
![Wink](http://www.abandonia.com/vbullet/images/smilies/generic/wink)
).
Also, if the above doesn't work, using the same way you already listen for WM_KEYDOWN messages, you could just add the special case for the WM_SYSKEYUP message. Details are available here:
http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
It's easy to understand so I won't explain.
Japo:
Ah yes, it's not that easy. WinAPI is a pretty complicated API and there's usually more ways than one (or even two) to accomplish something, even if it seems to be something trivial
Quote:
Originally Posted by Japo
and both WinAPI functions decide not to tell some equivalent keys apart, otherwise they could do the job.)
|
Well if that were really the case then we wouldn't have any good solution, right?
Utilizing XNA for a purely desktop windowed app makes about the same sense as using SDL in this case.