problem with keys combination!

A

Alex

Hi at all,
I made a simple program that make a screenshot of Desktop and use it
as fullscreen background and then a ball erase image making illusion
that erase Desktop. The program working fine and I succesfully blocked
all keys but I have a problem with hotkey combination Ctrl-Alt-
Del...that bypass my FullScreen Application. Reading in google I
understood that if I want disable this keys I have to operate in more
low level. But I'm a newbe and I don't know how to make it(operate
with api is very hard 4 me).I tried several days to find a workaround
like replace one of that keys but doesn't work :-((
Plus..I can't install pyHook because there isn't a 2.6 version :-((
Can someone help me ??
thanks in advance
Alex

This is a piece of my code:
while True:
pg.event.pump()
keyinput = pg.key.get_pressed()
# press ESC to exit
if keyinput[pg.K_ESCAPE]
raise SystemExit
if keyinput[pygame.K_LALT] and keyinput[pygame.K_LCTRL] and
keyinput[pygame.K_DELETE]:
win32api.keybd_event(win32con.VK_ESCAPE,0)
#shell = win32com.client.Dispatch("WScript.Shell")
#shell.SendKeys("{ESC}")
#ignore keyboard input
def IgnoreKeyboardInterrupt():
return signal.signal(signal.SIGINT,signal.SIG_IGN)
 
S

Steven D'Aprano

Hi at all,
I made a simple program that make a screenshot of Desktop and use it
as fullscreen background and then a ball erase image making illusion
that erase Desktop. The program working fine and I succesfully blocked
all keys but I have a problem with hotkey combination Ctrl-Alt-
Del...that bypass my FullScreen Application.


What operating system are you using? Windows?

As I understand it, you can't block, modify, or otherwise access Ctrl-Alt-
Del while running under Windows: it is the "Secure Attention Key", and is
designed to be virtually impossible to interfere with. It's not *quite*
impossible, but it is the deepest, darkest black magic. Microsoft makes
it close enough to impossible as makes no difference even for experienced
developers.

As a newbie, well, put it this way: it's like somebody saying "Hi guys, I
have a shiny new Swiss Army Knife, the one with the screwdriver and the
corkscrew. I'd like to build my own Space Shuttle -- what do I do?"

http://stackoverflow.com/questions/...l-key-events-including-ctrlaltdel-and-ctrltab

http://en.wikipedia.org/wiki/Control-Alt-Delete

You should also read this:

http://blogs.msdn.com/oldnewthing/archive/2004/02/16/73780.aspx
 
A

Alex

Hi Steven,
As I understand it, you can't block, modify, or otherwise access Ctrl-Alt-
Del while running under Windows: it is the "Secure Attention Key", and is
designed to be virtually impossible to interfere with. It's not *quite*
impossible, but it is the deepest, darkest black magic. Microsoft makes
it close enough to impossible as makes no difference even for experienced
developers.

No, is possible but for my level is quite impossible:

http://www.codeproject.com/KB/winsdk/AntonioWinLock.aspx

....in this article the author move a lot a functions in a dll and
make a demonstration with a VB and C code to use it...plus...there is
his program that make it :))))
I thought that python can read dll via ctypes...but it's very hard for
me :-((
As a newbie, well, put it this way: it's like somebody saying "Hi guys, I
have a shiny new Swiss Army Knife, the one with the screwdriver and the
corkscrew. I'd like to build my own Space Shuttle -- what do I do?"
:))))))))))....but yes We caaaaannnnnnn

Alex
 
T

Terry Reedy

Alex said:
Hi at all,
I made a simple program that make a screenshot of Desktop and use it
as fullscreen background and then a ball erase image making illusion
that erase Desktop. The program working fine and I succesfully blocked
all keys but I have a problem with hotkey combination Ctrl-Alt-
Del...that bypass my FullScreen Application.

Blocking Ctrl-Alt-Del leaves the power switch or maybe the plug as the
only way for the user to regain control. Why would you want to do that?
 
A

Alex

Blocking Ctrl-Alt-Del leaves the power switch or maybe the plug as the
only way for the user to regain control. Why would you want to do that?

ONly for the reason that I explaine above...is for my little joke
application !
And I want disable all keys for about 30 seconds (time to erase
background)
I read about getasynckey() to intercept a key...but I don't know how
to change key pressed with another...maybe a solution ?

Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

comp.lang.java.gui FAQ 0

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top