Alt-F4 not working on Windows

Clicking on the lil X, red circle, etc etc etc, causes the window
manager or similar to give SDL an eventual SDL_QUIT message. It’s
therefore up to window manager to signal the ‘please close’.

That’s the thing. In ordinary circumstances, - sends the same signal. It is 100% functionally equivalent to clicking the X button, identical in every way. The only difference is that one is done with the mouse and the other is done with the keyboard.

Under SDL’s input-handling scheme, however, this creates a discontinuity that shouldn’t be there. If you click the mouse somewhere that’s not within the window’s active area (including on the frame,) the mouse click is intercepted by the window manager, not passed on the application. This is why clicking the X works. Keyboard input is handled differently. Unless what you typed is a system command, such as - or the Windows key, it’s passed to the application automatically. - is technically defined as the keyboard shortcut for the Close command that’s present in the “system menu” of every Windows window, even fullscreen ones where the menu bar isn’t visible. So pressing it invokes the Close command in the menu, which is hardwired into Windows to generate a “quit” message, exactly like clicking the X button.

Most programming schemes for creating windows work around some sort of widget set that handles input signals from the keyboard, and they give their first priority to menus because that’s how a Windows program is supposed to work. SDL doesn’t do this. It grabs all keyboard input if its program has input focus, and it doesn’t have a widget set because it’s optimized for blit-oriented game programming, not form-building. So the “menu shortcuts have priority” functionality has to be faked instead.

I’ve played plenty of games under windows where ALT-F4 doesn’t close
the game. And in my humble opinion it shouldn’t. Granted, ALT-F4 is
a strange keyboard combination, but what if it was plausible to bind
something as such ? Similar to CTRL-number, ALT-number, etc.

If ALT-F4 is supposed to generate an SDL_QUIT under windows, then what
about lining up code that generates an SDL_QUIT via some automagical
window manager / OS detection routine and associated keyboard
combinations ? And what if I wanted to make any of those given key
combinations usable within my application rather than force a program
close ?

I can’t agree with that. Conventions and standards exist for a reason, and this one has a very good reason behind it. If you don’t have an arbitrarily defined and universally observed “close now” command, then the only way to quit out of a game is to select the game’s own in-game close command, which is generally found in a menu somewhere. Menus aren’t always accessible–during cutscenes, for example-- and sometimes it’s necessary to go through several menus to find the “Exit” command. This can be a real nuisance if you need to get out of a program quickly, especially a fullscreen game. I’ve also played some games where - doesn’t quit, and a few where it does but doesn’t quit properly, leaving the screen corrupted or various other nuisances. This is very bad programming and annoys users that are used to using - to quit, and it shouldn’t be associated with SDL.

----- Original Message -----
From: unfies@gmail.com (William Langford)
To: A list for developers using the SDL library. (includes SDL-announce)
Sent: Thursday, May 1, 2008 10:17:53 AM
Subject: Re: [SDL] Alt-F4 not working on Windows

If ALT-F4 is supposed to generate an SDL_QUIT under windows, then
what
about lining up code that generates an SDL_QUIT via some automagical
window manager / OS detection routine and associated keyboard
combinations ? And what if I wanted to make any of those given key
combinations usable within my application rather than force a program
close ?

I can’t agree with that. Conventions and standards exist for a
reason, and this one has a very good reason behind it. If you don’t
have an arbitrarily defined and universally observed "close now"
command, then the only way to quit out of a game is to select the
game’s own in-game close command, which is generally found in a menu
somewhere. Menus aren’t always accessible–during cutscenes, for
example-- and sometimes it’s necessary to go through several menus
to find the “Exit” command. This can be a real nuisance if you need
to get out of a program quickly, especially a fullscreen game. I’ve
also played some games where - doesn’t quit, and a few
where it does but doesn’t quit properly, leaving the screen
corrupted or various other nuisances. This is very bad programming
and annoys users that are used to using - to quit, and it
shouldn’t be associated with SDL.

I’m not sure if I’m allowed to make this argument or not, but as a
user I’ve always been wary of the Alt-F4 command in games, because my
general impression is that it implies a “merciless” end-program
request, and I’m pretty sure that I’ve NEVER wanted that feature
barring times I’ve played games at work, which is a no-no anyhow. :slight_smile:
And by “merciless” I don’t mean like kill -9, I mean that Windows just
assumes that you MEANT to press that key-combination. For office
applications this is likely okay.

I feel like I should point out that, even on Mac, the Command-Q
combination is a standard defined by Apple, but not ENFORCED by
Apple. It’s just as easy to change the “Quit” key command to be
nothing at all, or something completely different. And case-in-point,
World of Warcraft does not recognize the Command-Q keystroke unless
you define it to have some in-game meaning, and I think this is
important. See, what happens if I’m playing your game and I try to
press Alt-4 (keeping with Warcraft, this is a default keystroke for
performing a skill), but I have fat fingers and move a little too
aggressively to the key, and manage instead to hit the F4 key?
Suddenly my game quits on me, and my party hates me, and I’ve gotten
quite angry and may even take steps to remove the key from my keyboard.

Gamers DO remove keys from their keyboard. For instance, back when I
used to play Final Fantasy Online (admittedly a poorly-designed game
in many technical ways) we would often remove the “Windows” key from
our keyboards because not only did it LEAVE the program, but when the
program lost front-focus, it cried like a baby and quit on you. The
Windows-key became the enemy.

Anyway, what I’m trying to say is that for normal programs, I think
yes, adhering to the standard is good. For games, I think you need to
be able to say “shove-off” to the standard. I can as easily see a
game designed that used commands Alt-F1 through Alt-F6 for a
legitimate sequence of commands, and having to work around that, were
the ability you’re describing to be built into SDL, that would provide
a lot of excess work specifically for the Windows port of the game,
wouldn’t it?

Isn’t it just simpler to use “#ifdef __WINDOWS” or whatever the
Windows identifier is to capture Alt-F4 if that’s a feature you want
to support, rather than forcing other non-Windows developers to
redesign their keyboard command interface (which is completely
legitimate on Linux AND Mac) for the Windows version, or add what I
could only imagine to likely be excess code to work AROUND the Alt-F4
check in the Windows version of their software?

– Scott

On a side note, you mentioned a game which you said is fortunately
very stable, because were it to crash you would have to reinstall the
game, as your data would be corrupt. As a user and gamer myself, this
scares the living you-know-what out of me. I would probably never
even TRY playing a game if I heard this about it, because there are a
LOT of things OTHER than the game itself which can cause a crash,
including cats, electrical storms, hot coffee or other drinks), faulty
power-supplies, problems with motherboard/video cards, etc… Even as
a relatively inexperienced developer, though, I have to believe that
there’s a better way to store game data that doesn’t force you to
reinstall the ENTIRE game if something crashes and/or gets corrupted.
Speaking as a mere user again, this sounds to me like an INCREDIBLY
bad design decision.

Anyway, my $.02.On May 2, 2008, at 3:16 AM, Mason Wheeler wrote:

See, what happens if I’m playing your game and I try to
press Alt-4 (keeping with Warcraft, this is a default keystroke for
performing a skill), but I have fat fingers and move a little too
aggressively to the key, and manage instead to hit the F4 key?
Suddenly my game quits on me, and my party hates me, and I’ve gotten
quite angry and may even take steps to remove the key from my keyboard.
This is why a well-designed game (or any application in which data loss might be an issue) will prompt you if you really want to quit, and/or if you want to save before quitting. That’s the nice thing about the idea of a graceful shutdown, as opposed to outright program termination: It can be cancelled. Most Windows and Mac games are pretty well-behaved about this. If you hit - or -Q, it asks if you really want to quit. If you say yes, then it begins to shut down. If an online game dumps you back into Windows and ruins your party because you hit the wrong key on accident, then yes, the programmers screwed up, but their mistake wasn’t adhering to established standards.

----- Original Message -----
From: orcein@gmail.com (Scott Harper)
To: A list for developers using the SDL library. (includes SDL-announce)
Sent: Thursday, May 1, 2008 3:39:36 PM
Subject: Re: [SDL] Alt-F4 not working on Windows

Darwinia uses ALT-TAB by design to switch between “programs” and other
conventions because the game simulates a fictional OS. SDL should not
restrict that kind of creative freedom.

Tim

Hoo boy. Things always get muddled when people bring up words like “freedom” in the context of software development. My take on this is, creative freedom is nice, but it definitely needs to be restricted, because the most important freedom of all is the right of the computer’s owner to have the computer do what he or she intends for it to do. If you legitimize the practice of taking absolute control of the computer out of its owner’s hands, even in games, you make it that much easier for truly scary stuff like TC to get its foot in the door.> ----- Original Message -----

From: tuxdev103@gmail.com (Tim Goya)
To: A list for developers using the SDL library. (includes SDL-announce)
Sent: Thursday, May 1, 2008 4:07:51 PM
Subject: Re: [SDL] Alt-F4 not working on Windows

Darwinia uses ALT-TAB by design to switch between “programs” and other
conventions because the game simulates a fictional OS. SDL should not
restrict that kind of creative freedom.

Tim

Hoo boy, this takes me back. I was involved in the port of Doom II to the
Mac back in the middle 90s… Of course, Doom and all of its decedents use
the mouse to move you forward and backward and to turn left and right. It
turns out that that use of the mouse was forbidden by the Apple usability
guidelines. There Mac fans up in arms over the failure to comply with the
holy word as writ by by great lord Mac. We got flamed left and right. Oh my.
OTOH none of those Mac fans could tell us any other way to navigate in the
game. We asked what they thought we should do and the result was “comply
with the guidelines”. Of course, the guidelines were written without any
consideration for how you would use a mouse in a first person shooter so the
guidelines were useless.

What it came down to is that you had to violate the guidelines to implement
the game. Letting some companies guidelines or even their hard and fast
rules interfere with game design is like refusing to change your mind when
faced with new evidence. It doesn’t make sense. Sure, you have to balance
design against social norms, but you need not be, and in some cases must not
be, controlled by the norms. If my design works best when I give some
meaning to alt-f1 through alt-f10 then I should be able to implement that
without having to change the source code of SDL to do it. IMHO, SDL should
allow you to conform to the norms of your system if you chose to. It must
not enforce the norms of a particular system. And, most importantly, it must
not do things like making alt-f4 == SDL_QUIT on windows but not on Mac or
LInux or whatever else I want to code for.

Oh well, that is one of the many things I learned from working on that port.
Another is to never never never call functions with side effects in the
argument list of other functions. :slight_smile: Oh, and BSP trees are cool but hard to
debug.

Bob PendletonOn Thu, May 1, 2008 at 6:19 PM, Mason Wheeler wrote:

Hoo boy. Things always get muddled when people bring up words like
"freedom" in the context of software development. My take on this is,
creative freedom is nice, but it definitely needs to be restricted,
because the most important freedom of all is the right of the computer’s
owner to have the computer do what he or she intends for it to do. If you
legitimize the practice of taking absolute control of the computer out of
its owner’s hands, even in games, you make it that much easier for truly
scary stuff like TC to get its foot in the door.

----- Original Message ----
From: Tim Goya
To: A list for developers using the SDL library. (includes SDL-announce) <
sdl at lists.libsdl.org>
Sent: Thursday, May 1, 2008 4:07:51 PM
Subject: Re: [SDL] Alt-F4 not working on Windows

Darwinia uses ALT-TAB by design to switch between “programs” and other
conventions because the game simulates a fictional OS. SDL should not
restrict that kind of creative freedom.

Tim


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

±-------------------------------------+

Hello !

Personally i like it that ALT F4 on Windows, Apple Q on Mac OSX and
so on generate a WM_QUIT with SDL. That way i don’t have to ask the
user, what QUIT key do you wan to use.

When you get an WM_QUIT event, you can still ask the user what to do next.

CU

I’m with You and Bob Bendleton here. SDL should not restrict the
keyboard usage on certain platforms, because it will break portability.

SDL could have something like
SDL_EnableOSShortCuts( int bool )
to allow easy to use compatibility layer for those who want to enable
these OS specific keyboard events.On Thursday 01 May 2008, Will Langford wrote:

On Wed, Apr 30, 2008 at 6:49 PM, Mason Wheeler wrote:

- is a Windows standard. It always means “quit” on
every program.

While I’m not a majorly active developer in SDL at the moment, nor
very active in the mailing lists… I wouldn’t mind throwing my two
cents into this foray.

Synopsis: this doesn’t belong in SDL… much like many of the other
’why doesnt SDL do foo?’ requests that penetrate beyond the 'SIMPLE’
part of the SDL name. If there’s a desire for a nice global ‘catch
all common program termination keyboard combinations’, I’d suggest
the creation of SDL_quit library or similar.

Clicking on the lil X, red circle, etc etc etc, causes the window
manager or similar to give SDL an eventual SDL_QUIT message. It’s
therefore up to window manager to signal the ‘please close’.

I’ve played plenty of games under windows where ALT-F4 doesn’t close
the game. And in my humble opinion it shouldn’t. Granted, ALT-F4 is
a strange keyboard combination, but what if it was plausible to bind
something as such ? Similar to CTRL-number, ALT-number, etc.

If ALT-F4 is supposed to generate an SDL_QUIT under windows, then
what about lining up code that generates an SDL_QUIT via some
automagical window manager / OS detection routine and associated
keyboard combinations ? And what if I wanted to make any of those
given key combinations usable within my application rather than force
a program close ?

Apples and oranges. The “don’t hook the mouse” rule makes a lot of sense for windowed programs, and was written in a time before fullscreen gaming had even been dreamed up. And as you pointed out, there’s no other good way to control an FPS. What you did enhanced the players’ experience without any true drawbacks, simply by ignoring an outdated rule that needed to be updated.

Here, we’re talking about the right of a computer owner to quit any program at any time. This is a fundamental right and must be held absolutely sacred. If you violate it, you’re taking control of the computer out of its owners’ hands. In other words, you’re writing malware. The line here isn’t “there’s no alternative”, it’s “there’s no excuse.” Interface considerations are secondary, and key combinations can be altered just a little bit to keep from b0rking one very important command that’s been in place forever and then some.> ----- Original Message -----

From: bob@pendleton.com (Bob Pendleton)
To: A list for developers using the SDL library. (includes SDL-announce)
Sent: Thursday, May 1, 2008 4:41:21 PM
Subject: Re: [SDL] Alt-F4 not working on Windows

Hoo boy, this takes me back. I was involved in the port of Doom II to the Mac back in the middle 90s…
Of course, Doom and all of its decedents use the mouse to move you forward and backward and to turn left
and right. It turns out that that use of the mouse was forbidden by the Apple usability guidelines. There Mac
fans up in arms over the failure to comply with the holy word as writ by by great lord Mac. We got flamed
left and right. Oh my. OTOH none of those Mac fans could tell us any other way to navigate in the game.
We asked what they thought we should do and the result was “comply with the guidelines”. Of course, the
guidelines were written without any consideration for how you would use a mouse in a first person shooter
so the guidelines were useless.

Apples and oranges. The “don’t hook the mouse” rule makes a lot of
sense for windowed programs, and was written in a time before fullscreen
gaming had even been dreamed up. And as you pointed out, there’s no
other good way to control an FPS. What you did enhanced the players’
experience without any true drawbacks, simply by ignoring an outdated
rule that needed to be updated.

Here, we’re talking about the right of a computer owner to quit any
program at any time. This is a fundamental right and must be held
absolutely sacred. If you violate it, you’re taking control of the
computer out of its owners’ hands. In other words, you’re writing
malware. The line here isn’t “there’s no alternative”, it’s “there’s no
excuse.” Interface considerations are secondary, and key combinations
can be altered just a little bit to keep from b0rking one very important
command that’s been in place forever and then some.

and is left to the developer to implement! it should not be default, I’ve
ALT+F4
mapped to other uses in a few games I’ve developed and this is the point
of SDL
you can do what you like. If ALT+F4 was to do what is intended by the OS
then I’d
have all sorts of problems having to undo it.

You said yourself apples and oranges…On Fri, 02 May 2008 12:26:34 +0100, Mason Wheeler wrote:


Using Opera’s revolutionary e-mail client: http://www.opera.com/mail/

It’s left for the developer to implement as a graceful shutdown command, because there’s no way
for the OS do to it for the program. It’s reserved and should not be used for anything else, because
to do so violates the computer owner’s rights.

Your right to be “creative” and to “do what you want” ENDS where your users’ right to control their
own computer begins. It’s that simple.> ----- Original Message -----

From: graham.houston@rushpark.co.uk (Graham Houston)
To: A list for developers using the SDL library. (includes SDL-announce)
Sent: Friday, May 2, 2008 5:46:13 AM
Subject: Re: [SDL] Alt-F4 not working on Windows

and is left to the developer to implement! it should not be default, I’ve

ALT+F4 mapped to other uses in a few games I’ve developed and this is the point
of SDL you can do what you like. If ALT+F4 was to do what is intended by the OS
then I’d have all sorts of problems having to undo it.

You said yourself apples and oranges…

It’s left for the developer to implement as a graceful shutdown
command, because there’s no way for the OS do to it for the program.
It’s reserved and should not be used for anything else, because to do
so violates the computer owner’s rights.

No it does not.
And I for one would not want any game to quit when I press Alt+F4.
And for other programs that could be done easily. I would agree that it
would be nice to have an easy OS independent way to enable OS specific
shortcuts, but forcing those would be silly.

Your right to be “creative” and to “do what you want” ENDS where your
users’ right to control their own computer begins. It’s that simple.

No it’s up to the users to agree what you have chosen to do or to not
use your creations.On Friday 02 May 2008, Mason Wheeler wrote:

It’s left for the developer to implement as a graceful shutdown command,
because there’s no way
for the OS do to it for the program. It’s reserved and should not be
used for anything else, because
to do so violates the computer owner’s rights.

Your right to be “creative” and to “do what you want” ENDS where your
users’ right to control their
own computer begins. It’s that simple.

Mason sometimes you have good reason not to do something that everything
else does
for example: I’m in the middle of a FPS game say Quake and I want to
change weapon,
now the weapon selects are keys are 1-9 if I reach for the 3 key I can
easly over-reach
and hit the F4 key not good when I use the ALT key for firing the weapon!!

GrahamOn Fri, 02 May 2008 14:00:44 +0100, Mason Wheeler wrote:

----- Original Message ----
From: Graham Houston <@Graham_Houston>
To: A list for developers using the SDL library. (includes SDL-announce)

Sent: Friday, May 2, 2008 5:46:13 AM
Subject: Re: [SDL] Alt-F4 not working on Windows

and is left to the developer to implement! it should not be default,
I’ve

ALT+F4 mapped to other uses in a few games I’ve developed and this is
the point
of SDL you can do what you like. If ALT+F4 was to do what is intended
by the OS
then I’d have all sorts of problems having to undo it.

You said yourself apples and oranges…


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


Using Opera’s revolutionary e-mail client: http://www.opera.com/mail/

Mason, take a deep breath and relax.

You have now wrapped your self up in human rights, mom, the flag, and apple
pie. That is, you are working very hard to paint your self into a corner so
tightly that you can not back down. Please, just call us all Nazis so we can
invoke Godwin’s law, have a good laugh and get on with life…

BTW, having alt-f4 terminate a program (cleanly or not) is not a fundamental
human right. It is a windows convention. A convention that can be ignored
and often is ignored, by developers and users.

Tools, not rules.

Bob PendletonOn Fri, May 2, 2008 at 8:00 AM, Mason Wheeler wrote:

It’s left for the developer to implement as a graceful shutdown command,
because there’s no way
for the OS do to it for the program. It’s reserved and should not be used
for anything else, because
to do so violates the computer owner’s rights.

Your right to be “creative” and to “do what you want” ENDS where your
users’ right to control their
own computer begins. It’s that simple.

----- Original Message ----
From: Graham Houston <graham.houston at rushpark.co.uk>
To: A list for developers using the SDL library. (includes SDL-announce) <
sdl at lists.libsdl.org>
Sent: Friday, May 2, 2008 5:46:13 AM
Subject: Re: [SDL] Alt-F4 not working on Windows

and is left to the developer to implement! it should not be default, I’ve

ALT+F4 mapped to other uses in a few games I’ve developed and this is the
point
of SDL you can do what you like. If ALT+F4 was to do what is intended by
the OS
then I’d have all sorts of problems having to undo it.

You said yourself apples and oranges…


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

±-------------------------------------+

I’m sorry, but this is something I feel very strongly about. We’ve got Microsoft and a handful of other corporations who have demonstrated, time and time again, that they do not have users’ best interests at heart, working on putting TC into everyone’s computers as a standard “feature,” which–long propaganda articles about “improved security” notwithstanding–is designed to transfer fine control of the computer from the owner to the programmer. When you consider how much of our modern society is dependent on computer systems, that DOES come pretty darn close to being a human rights violation, and I get a bit touchy about anything that legitimizes the practice in any way.> ----- Original Message -----

From: bob@pendleton.com (Bob Pendleton)
To: A list for developers using the SDL library. (includes SDL-announce)
Sent: Friday, May 2, 2008 6:26:49 AM
Subject: Re: [SDL] Alt-F4 not working on Windows

Mason, take a deep breath and relax.

You have now wrapped your self up in human rights, mom, the flag, and apple pie. That is, you are >working very hard to paint your self into a corner so tightly that you can not back down. Please, just
call us all Nazis so we can invoke Godwin’s law, have a good laugh and get on with life…

Ah… I understand that point of view very well. Let me just point out one
thing I think you got wrong. It isn’t about transferring control from the
user to the programmer. It is all about transferring control from the user
to the corporation. Programmers at MS are not getting any more control
through their efforts for MS. The top two or three people who run MS are
getting the control. Same goes for all big corporations. The little guys are
just grunts, the top guys get all the power and all the money.

SDL helps little guys build software that is not under the control of anyone
but the little guys.

Bob PendletonOn Fri, May 2, 2008 at 8:36 AM, Mason Wheeler wrote:

I’m sorry, but this is something I feel very strongly about. We’ve got
Microsoft and a handful of other corporations who have demonstrated, time
and time again, that they do not have users’ best interests at heart,
working on putting TC into everyone’s computers as a standard "feature,"
which–long propaganda articles about "improved security"
notwithstanding–is designed to transfer fine control of the computer from
the owner to the programmer. When you consider how much of our modern
society is dependent on computer systems, that DOES come pretty darn close
to being a human rights violation, and I get a bit touchy about anything
that legitimizes the practice in any way.

----- Original Message ----
From: Bob Pendleton <@Bob_Pendleton>
To: A list for developers using the SDL library. (includes SDL-announce) <
sdl at lists.libsdl.org>
Sent: Friday, May 2, 2008 6:26:49 AM
Subject: Re: [SDL] Alt-F4 not working on Windows

Mason, take a deep breath and relax.

You have now wrapped your self up in human rights, mom, the flag, and
apple pie. That is, you are >working very hard to paint your self into a
corner so tightly that you can not back down. Please, just
call us all Nazis so we can invoke Godwin’s law, have a good laugh and get
on with life…


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

±-------------------------------------+

Ah… I understand that point of view very well. Let me just point out one thing I think you got wrong.
It isn’t about transferring control from the user to the programmer. It is all about transferring control
from the user to the corporation. Programmers at MS are not getting any more control through their
efforts for MS. The top two or three people who run MS are getting the control. Same goes for
all big corporations. The little guys are just grunts, the top guys get all the power and all the money.

I understand, and that’s what I meant. In the practical sense, Microsoft’s programs are “written by Microsoft,” not by John Q. Microserf.

SDL helps little guys build software that is not under the control of anyone but the little guys.
That’s the thing. Software should be under the control of the user, not the programmer, whether or not the programmer belongs to an evil megacorporation.
----- Original Message -----
From: bob@pendleton.com (Bob Pendleton)
To: A list for developers using the SDL library. (includes SDL-announce)
Sent: Friday, May 2, 2008 6:42:37 AM
Subject: Re: [SDL] Alt-F4 not working on Windows

Mason Wheeler wrote:

Ah… I understand that point of view very well. Let me just point out
one thing I think you got wrong.
It isn’t about transferring control from the user to the programmer. It
is all about transferring control
from the user to the corporation. Programmers at MS are not getting any
more control through their
efforts for MS. The top two or three people who run MS are getting
the control. Same goes for
all big corporations. The little guys are just grunts, the top guys get
all the power and all the money.

I understand, and that’s what I meant. In the practical sense,
Microsoft’s programs are “written by Microsoft,” not by John Q. Microserf.

SDL helps little guys build software that is not under the control of
anyone but the little guys.
That’s the thing. Software should be under the control of the user, not
the programmer, whether or not the programmer belongs to an evil
megacorporation.

The trouble with this long thread is, some of us are discussing it
from the purely engineering standpoint and the two sides will
probably have to agree to disagree to some extent.

IMHO, a developer should not be forcibly limited to something that
is recommended UI behaviour for what is usually windowed
applications. Of course this isn’t anywhere ideal for a developer
with your views, but the fact is that a developer has always been
able to do almost any kind of wrong or non-standard thing with a
Win32 message loop. And SDL is a low-level layer.

IMHO, something that forcibly enforces UI recommendations should
be optional or live in a separate layer. Elsewhere others have
mentioned that there are apps that need control over Alt-F4.
Virtual PC, for example, needs to and does keep control of Alt-F4,
Alt-Tab, etc., all those recommended standard UI keystrokes.

I trust Sam will do the right thing. Just a cheap USD0.02. :-)> ----- Original Message ----

From: Bob Pendleton
To: A list for developers using the SDL library. (includes SDL-announce)
Sent: Friday, May 2, 2008 6:42:37 AM
Subject: Re: [SDL] Alt-F4 not working on Windows


Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia

Mason Wheeler wrote:> ----- Original Message ----

From: Bob Pendleton
To: A list for developers using the SDL library. (includes SDL-announce)

Sent: Friday, May 2, 2008 6:42:37 AM
Subject: Re: [SDL] Alt-F4 not working on Windows
[snipped all]

I apologize in advance for prolonging this, but I tried to do a
search, all I found was the following (anyone have more useful
links to share?):

End users:
http://www.microsoft.com/enable/products/keyboard.aspx
http://support.microsoft.com/kb/126449
http://support.microsoft.com/kb/301583

MSDN:
http://msdn.microsoft.com/en-us/library/bb545461.aspx

For the MSDN page: Unfortunately it’s pretty vague and ambiguous
if we try to apply those rules in a strict fashion to applications
like games or emulators. The rules implies a certain degree of
similarity to windowed applications that deal with documents. So
who or how do we decide which shortcut combination is mandatory
for unconventional full-screen apps? Looking at the document, it’s
unclear to me why Alt-F4 is singled out as special, something that
must be relied upon to work for all apps.


Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia

Virtual PC, for example, needs to and does keep control of Alt-F4,
Alt-Tab, etc., all those recommended standard UI keystrokes.

That reminds me of one of the original SDL-using application (if not
the first?): an emulator that probably needed to do just that. :-)On Fri, May 2, 2008 at 10:12 AM, KHMan wrote:


http://pphaneuf.livejournal.com/