How to detect ctrl+alt+del keyboard event from SDL?

Hi
I am using SDL 1.4,
and i want to pause my SDL app if user use ctrl+alt+del.
Is it possible to detect this keyboard event from SDL?–
Greets

WS Liu

psboy wrote:

Hi
I am using SDL 1.4,
and i want to pause my SDL app if user use ctrl+alt+del.
Is it possible to detect this keyboard event from SDL?


Greets

WS Liu

I might be way off, but I don’t think so. The Ctrl-Alt-Del is a special
sequence that generates an interrupt and is handled by the OS itself.
The reason Windows would have you use this key-combination to log into
windows (At least, according to the MCP/MCSE tests) was that this
interrupt could not be software generated or intercepted by a running
program. (But that’s also Microsoft talking… the same people that say
Windows has no bugs at all.)

I think in all likelihood, if your users are giving you the three-finger
salute, it might already be too late to consider pausing…

I know it’s not much help, but Good luck. =)

<<<
Hi
I am using SDL 1.4,
and i want to pause my SDL app if user use ctrl+alt+del.
Is it possible to detect this keyboard event from SDL?–
Greets

SDL 1.4 ?? Did I fall asleep too long ?

Julien CLEMENT

<<<
Hi
I am using SDL 1.4,
and i want to pause my SDL app if user use ctrl+alt+del.
Is it possible to detect this keyboard event from SDL?

SDL 1.4 ?? Did I fall asleep too long ?

me too.

Assuming SDL 1.2:

You can capture the key combinations by having variables that hold
successive states (just ctrl, ctrl and alt, etc). Once you detect the
Del key and ctrl and alt are already pressed, trigger your pause behavior.

I’m not sure if this key combination bypasses your application, or if you
get the event and then the OS. I agree with the earlier post, though, if the
user is bailing,you may need more help than obi wan kenobi can provide.

relevent help pages with Key constants:
http://www.libsdl.org/docs/html/sdlkeysym.html
http://www.libsdl.org/docs/html/sdlkey.html

Hope that helps!

JohnOn Wed, Jun 16, 2010 at 6:46 AM, julien CLEMENT wrote:

If I recall correctly from my Win32 programming days, this is a system key
event, you need to do some
extra steps to be able to handle it.

With some GoogleFu, I have found this information,

http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/e1cd1624-33fd-44c8-a953-14296c08ae58/On Wed, Jun 16, 2010 at 3:28 PM, John Magnotti <john.magnotti at auburn.edu>wrote:

On Wed, Jun 16, 2010 at 6:46 AM, julien CLEMENT wrote:

<<<
Hi
I am using SDL 1.4,
and i want to pause my SDL app if user use ctrl+alt+del.
Is it possible to detect this keyboard event from SDL?

SDL 1.4 ?? Did I fall asleep too long ?

me too.

Assuming SDL 1.2:

You can capture the key combinations by having variables that hold
successive states (just ctrl, ctrl and alt, etc). Once you detect the
Del key and ctrl and alt are already pressed, trigger your pause behavior.

I’m not sure if this key combination bypasses your application, or if you
get the event and then the OS. I agree with the earlier post, though, if the
user is bailing,you may need more help than obi wan kenobi can provide.

relevent help pages with Key constants:
http://www.libsdl.org/docs/html/sdlkeysym.html
http://www.libsdl.org/docs/html/sdlkey.html

Hope that helps!

John


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

You might want a different pause button.On Wed, Jun 16, 2010 at 2:37 AM, psboy <psboy.liu at gmail.com> wrote:

Hi
I am using SDL 1.4,
and i want to pause my SDL app if user use ctrl+alt+del.
Is it possible to detect this keyboard event from SDL?


Greets

WS Liu


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

Or just pause when you lose focus, if that’s what you’re after.On Wed, Jun 16, 2010 at 1:03 PM, Jeremiah wrote:

You might want a different pause button.

On Wed, Jun 16, 2010 at 2:37 AM, psboy <psboy.liu at gmail.com> wrote:

Hi
I am using SDL 1.4,
and i want to pause my SDL app if user use ctrl+alt+del.
Is it possible to detect this keyboard event from SDL?


Greets

WS Liu


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


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

Hi
I am using SDL 1.4,
and i want to pause my SDL app if user use ctrl+alt+del.
Is it possible to detect this keyboard event from SDL?

i would guess that sdl can get the key event but not sure all operating
systems would pass it to the app. you might write a test for it and see
what happens.

mattOn Wed, 16 Jun 2010, psboy wrote:

Windows certainly does not let you handle it. This would break the security offered by having users (with their computers so configured) to press ctrl alt del before logging in.Sent from my Verizon Wireless BlackBerry

----- Original Message -----
From: mattmatteh@gmail.com ()
Date: Wed, 16 Jun 2010 14:06:09
To: SDL Development List
Subject: Re: [SDL] How to detect ctrl+alt+del keyboard event from SDL?

On Wed, 16 Jun 2010, psboy wrote:

Hi
I am using SDL 1.4,
and i want to pause my SDL app if user use ctrl+alt+del.
Is it possible to detect this keyboard event from SDL?

i would guess that sdl can get the key event but not sure all operating
systems would pass it to the app. you might write a test for it and see
what happens.

matt


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

Oh, I must have SDL 1.4! Where’s the repo? :wink:
Come to think of it, I’m sure Sam would be interested too.

Jonny DOn Wed, Jun 16, 2010 at 4:46 AM, julien CLEMENT wrote:

<<<
Hi
I am using SDL 1.4,
and i want to pause my SDL app if user use ctrl+alt+del.
Is it possible to detect this keyboard event from SDL?


Greets

SDL 1.4 ?? Did I fall asleep too long ?

Julien CLEMENT


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

Sorry,
That was typo. :frowning:
I mean 1.2.4.

2010/6/16 julien CLEMENT > <<<

Hi
I am using SDL 1.4,
and i want to pause my SDL app if user use ctrl+alt+del.
Is it possible to detect this keyboard event from SDL?


Greets

SDL 1.4 ?? Did I fall asleep too long ?

Julien CLEMENT


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


Greets

WS Liu

Sorry,
That was typo.
I mean 1.2.14 :Q

2010/6/16 julien CLEMENT > <<<

Hi
I am using SDL 1.4,
and i want to pause my SDL app if user use ctrl+alt+del.
Is it possible to detect this keyboard event from SDL?


Greets

SDL 1.4 ?? Did I fall asleep too long ?

Julien CLEMENT


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


Greets

WS Liu

Hi,
I have seen this page before and try it.
It can disable alt+f4,ctrl+esc,alt+esc,and windows key,but it can not
disable ctrl+alt+del.
Seems ctrl+alt+del have been occupied by some system service?(ex: winlogon)
I also try below link, and it can work on XP,but still does not work on
windows 7.
http://www.codeproject.com/KB/winsdk/AntonioWinLock.aspx?msg=3502555#xx3502555xx
http://www.codeproject.com/KB/winsdk/AntonioWinLock.aspx?msg=3502555#xx3502555xxAnd
i think disable this combination key is not a good way.
If app crash or system error occur,you can’t use this combination key to
control your system.
Anyway,thanks for advise. :slight_smile:

2010/6/16 Paulo Pinto > If I recall correctly from my Win32 programming days, this is a system key

event, you need to do some
extra steps to be able to handle it.

With some GoogleFu, I have found this information,

http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/e1cd1624-33fd-44c8-a953-14296c08ae58/

On Wed, Jun 16, 2010 at 3:28 PM, John Magnotti <john.magnotti at auburn.edu>wrote:

On Wed, Jun 16, 2010 at 6:46 AM, julien CLEMENT wrote:

<<<
Hi
I am using SDL 1.4,
and i want to pause my SDL app if user use ctrl+alt+del.
Is it possible to detect this keyboard event from SDL?

SDL 1.4 ?? Did I fall asleep too long ?

me too.

Assuming SDL 1.2:

You can capture the key combinations by having variables that hold
successive states (just ctrl, ctrl and alt, etc). Once you detect the
Del key and ctrl and alt are already pressed, trigger your pause behavior.

I’m not sure if this key combination bypasses your application, or if you
get the event and then the OS. I agree with the earlier post, though, if the
user is bailing,you may need more help than obi wan kenobi can provide.

relevent help pages with Key constants:
http://www.libsdl.org/docs/html/sdlkeysym.html
http://www.libsdl.org/docs/html/sdlkey.html

Hope that helps!

John


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


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


Greets

WS Liu