1.2.14: Alt+Space opens Windows application system menu

If I press alt+space while playing my game in windowed mode, the application’s system menu opens, causing the game to stop and any keys that were pressed at the time to become stuck until the application is switched away from. This has been a problem in the past, and seems to be back with a vengeance since I updated to 1.2.14.

If SDL itself cannot address this, is there some kind of Win32 API call that I can use to do it myself? I really do not want any sort of alt codes other than alt+tab to interfere with the input to my program in windowed mode._________________________________________________________________
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141664/direct/01/
http://clk.atdmt.com/GBL/go/177141664/direct/01/

Hi,

Alt+Space is a system key combination like Alt+Tab.

On Win32 development if you want to prevent the system to handle Alt+Space,
you have to
catch the key event on your application loop and do not send it to the
default Win32 handler (DefWindowProc).

Having said this, you really should refrain from taking over OS key
combinations. This is exactly the kind of
usability issues that confuses users.–
Paulo

On Fri, Nov 13, 2009 at 7:34 AM, James Haley wrote:

If I press alt+space while playing my game in windowed mode, the
application’s system menu opens, causing the game to stop and any keys that
were pressed at the time to become stuck until the application is switched
away from. This has been a problem in the past, and seems to be back with a
vengeance since I updated to 1.2.14.

If SDL itself cannot address this, is there some kind of Win32 API call
that I can use to do it myself? I really do not want any sort of alt codes
other than alt+tab to interfere with the input to my program in windowed
mode.


Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up
now.http://clk.atdmt.com/GBL/go/177141664/direct/01/http://clk.atdmt.com/GBL/go/177141664/direct/01/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

On one hand it is true what you said, but on the other, I’ve never seen any commercial game ship with a problem like this either. The game’s default control scheme dates back to 1993 and changing it would be extremely controversial with my user base. Therefore I have to make it work “out of the box” so to speak. As is, it becomes unplayable as soon as you accidentally hit these two keys together.

So far the only thing I’ve found is to clear the WS_SYSMENU style from the window using Get/SetWindowLong in concert with SDL_GetSysWMInfo. Unfortunately this also removes the application’s title bar icon once you switch away from the window. I had hoped for a better solution than that.Date: Fri, 13 Nov 2009 08:59:21 +0100
From: pjmlp@progtools.org
To: sdl at lists.libsdl.org
Subject: Re: [SDL] 1.2.14: Alt+Space opens Windows application system menu

Hi,

Alt+Space is a system key combination like Alt+Tab.

On Win32 development if you want to prevent the system to handle Alt+Space, you have to
catch the key event on your application loop and do not send it to the default Win32 handler (DefWindowProc).

Having said this, you really should refrain from taking over OS key combinations. This is exactly the kind of
usability issues that confuses users.


Paulo

On Fri, Nov 13, 2009 at 7:34 AM, James Haley <@James_Haley> wrote:

If I press alt+space while playing my game in windowed mode, the application’s system menu opens, causing the game to stop and any keys that were pressed at the time to become stuck until the application is switched away from. This has been a problem in the past, and seems to be back with a vengeance since I updated to 1.2.14.

If SDL itself cannot address this, is there some kind of Win32 API call that I can use to do it myself? I really do not want any sort of alt codes other than alt+tab to interfere with the input to my program in windowed mode.

Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up now.


SDL mailing list

SDL at lists.libsdl.org

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Bing brings you maps, menus, and reviews organized in one place.
http://www.bing.com/search?q=restaurants&form=MFESRP&publ=WLHMTAG&crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1