• Advertisement

Archived

This topic is now archived and is closed to further replies.

Bllocking Windows keys in Windows 2000

This topic is 6520 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 all !! How the hell can I block the windows keys on the newer windows-keyboards. My game always jumps out and shows the start menu when I press the windows-keys ??? Phillip

Share this post


Link to post
Share on other sites
Advertisement
If you use DirectInput the windowkey is blocked automatically. I don''t beleive there is a way to block it using normal Win32 API calls, unless it works with a KeyboardHook.

WitchLord

Share this post


Link to post
Share on other sites
Don''t ever block it! Handle it!

Just watch the WM_ACTIVATE message and pause your game when its window is in the background. I believe the value that tells you this is:

if( LOWORD(wParam) == WA_INACTIVE )
{
// set a flag to pause the game
}
else
{
// clear the flag to resume the game
}





- null_pointer
Sabre Multimedia

Share this post


Link to post
Share on other sites
I don''t think that he would want the game to jump to the desktop when a win key is pressed. I mean, it''s annoying to have to wait for the desktop to load up and then have to cancel the pop up and go back in the game when you tried to fire and hit the win key. Lost many games of doom like that , so block it I say, and if you can''t, rip the keys out of every keyboard that is used to play your game

OneEyeLessThanNone
- life feeds on life feeds on life feeds on life feeds on life

Share this post


Link to post
Share on other sites

  • Advertisement