[SDL] Alt-F4 not working on Windows
Jacob Welsh
welshjf at gmail.com
Wed Apr 30 16:36:37 PDT 2008
That's the point. Alt-F4 is part of the operating system's interface;
that should not concern the programmer any more than "minimize" or
Alt-Tab. If you check for Alt-F4 events yourself, you're making the
unreasonable assumption that all operating systems supported by SDL have
this convention, which is not the case. On Linux it is perfectly
reasonable for the user to remap Alt-F4 to something else, and have some
other shortcut for "close".
On Linux, the Close button, Alt-F4, Ctrl+C, SIGTERM etc. all generate an
SDL_QUIT event; I assume this is also the intended behavior on Windows,
and it ought to be if it's not.
Abhinav Lele wrote:
> Mason,
>
> Why do you presume Alt+F4 to be a quit trigger. Here is an example.
> Blender. Famous 3D design application. Although blender traps alt+f4,
> but if you look the shortcut given for exit in its menu, it shows Ctrl
> + Q.
> SDL has to be generic you cannot always assume that Alt+F4 is quit.
>
>
>> If that's what has to be done, then IMO it hasn't been fixed. <ALT>-<F4> is a Windows standard. It always means "quit" on every program. (A few games I've seen override this behavior, which I consider very poor design.) Since by default, <ALT>-<F4> means "quit", it should always generate a SDL_QUIT event, not a SDL_KEYDOWN event. (Same goes for <Command>-Q on Macs.)
>>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
--
Jacob Welsh
TJHSST, Class of 2008
welshjf at gmail.com | http://www.tjhsst.edu/~jwelsh/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20080430/dec03b1a/attachment-0001.htm
More information about the SDL
mailing list