I have a funny issue when using GetAsyncKeyState() in my application.
I am using the following code to switch between full screen and windowed mode.
if(GetAsyncKeyState(VK_ENTER) && GetAsyncKeyState(VK_MENU))
{
// react on Alt & Enter keypress
}
But, the Alt key acts as though it is being held.Pressing Alt & Enter similtaneously works fine.
But, pressing Alt (wait for 10 seconds) then Enter also triggers the event. (Not good)
But, pressing Enter (waiting) then Alt doesn't trigger the event (This is good).
It is like when you press Alt to get a menu and then enter to select the item. Although I am not using any menu's and have no menu's tied to the window in my application.
Any ideas how I can stop this behavior?
Thanks in advance