[SDL] Alt-F4 not working on Windows

Abhinav Lele abhinav.lele at gmail.com
Wed Apr 30 16:21:55 PDT 2008


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.)


More information about the SDL mailing list