[SDL] Alt-F4 not working on Windows

Paul Duffy odubtaig at yahoo.co.uk
Mon May 5 09:58:39 PDT 2008


--- Graham Houston <graham.houston at rushpark.co.uk> wrote:

> I'd like to see this extended a little further to include keys that
> are  
> not only menu keys for example ALT+TAB, If I was to develop and I
> really  
> am, an enviroment that takes over the entire screen sorta like an OS 
> 
> inside an OS that creates its own windows etc inside of this SDL  
> enviroment I still want the interface to be consistant with the OS
> user  
> interface.. I want to allow ALT+TAB to switch the windows in my SDL
> app  
> etc..
> 
> perhaps SDL_disableOSKeys(true|false) ?
> 

I think something like that would be a solution which would best suit
the majority of people, although to make it more in line with the
majority of APIs (and make it easier to remember) I think enable,
rather than disable, would be the key word. It's clear that some people
want one behaviour while others want the other but the argument that it
should be one to the exclusion of the other is ideological.

1) The argument that not having Alt+F4 is somehow a restriction on the
'freedom of the user' goes directly against the majority exit strategy
of using Esc then selecting from a menu. This is an exit strategy which
has served many large games companies for over a decade and can be seen
in obvious use from Doom to Sims2. Show us the usability study that
demonstrates that using something other than Alt+F4 is some hideous
problem for users/gamers in Windows or drop the attitude. If you want
to make it your way or the highway, you're more than welcome to fork
the project.

2) The other PoV is that having to enable/disable specific keys per O/S
very much defeats the purpose of a cross-platform API, especially if
you're having to do this per function/thread, so having SDL based
commands which will generically enable/disable WM or O/S keys would be
a much more cross-platform way of handling it, especially (as has been
pointed out) you can't even guarantee that close/switch commands will
even be the same between computers running the same versions of Linux
as this is all user configurable.

Realistically, the only solution which is going to work is (as is often
the case) a compromise because:

- Forcing people to accept the O/S key commands without a choice is
stupid.

- Making it difficult (now the problem has been identified) for people
to use the O/S key commands is stupid.

So, being able to identify those key commands (if they are likely to
differ) and choose whether to use them or ignore them should be up to
the individual developer. It may also be necessary to determine which
shell Windows is using, I don't know how configurable LiteStep or
WindowBlinds are.

One thing I will say should never be blockable though, is the
CTRL+ALT+DELETE or equivalent because it's a hubristic developer who
believes his game will never crash (and more often the worst developers
who are guilty of such hubris) and there always needs to be an
'emergency escape'.

"Duct tape is like the Force. It has a dark side, it has a
light side, and it holds the Universe together."
-Carl Zwanig


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ



More information about the SDL mailing list