Advertisement Jump to content
Sign in to follow this  
Ancient Spirit

Disabling RWin, LWin, Alt-Tab

This topic is 4885 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

A crowbar, and some anaesthesics for the keyboard.

While RWin/LWin are a hassle when you press them by mistake, Alt-Tab is used by users to revert to another application. By removing this shortcut, you are not being very friendly to your users. Also, removing Alt-Tab does not serve any useful purpose at all, aside from maybe annoying your users, since even then, you would still have to write code for focus loss that occurs in many other cases that cannot be prevented, such as a message box from another program appearing and stealing focus from your application, which can lead to death of your application (if the user is lucky) or, more often, a deadlock where the screen displays your fullscreen application, but all user input goes to another window (where only killing your game can solve anything).

The standard way is to detect loss of focus by receiving the appropriate message from windows, stop doing anything not strictly necessary (rendering, for instance), putting the game on pause (if possible) and wait for focus to return in order to resume the game to a playable state.

If you are still willing to remove those keys, use the forum search, as this topic is discussed once per week or so, and very good answers have already been given.

Share this post

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

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!