Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > problem with keys combination!

Reply
Thread Tools

problem with keys combination!

 
 
Alex
Guest
Posts: n/a
 
      07-10-2009
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)
 
Reply With Quote
 
 
 
 
Steven D'Aprano
Guest
Posts: n/a
 
      07-10-2009
On Fri, 10 Jul 2009 08:33:18 -0700, Alex wrote:

> 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/8...el-and-ctrltab

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

You should also read this:

http://blogs.msdn.com/oldnewthing/ar.../16/73780.aspx



--
Steven
 
Reply With Quote
 
 
 
 
Alex
Guest
Posts: n/a
 
      07-10-2009
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...ioWinLock.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
 
Reply With Quote
 
Terry Reedy
Guest
Posts: n/a
 
      07-10-2009
Alex wrote:
> 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?

 
Reply With Quote
 
Alex
Guest
Posts: n/a
 
      07-11-2009

> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing map keys (no reordering of keys) alan C++ 3 11-28-2007 03:17 PM
How to link foreign keys & primary keys using python? Harry George Python 9 06-13-2006 06:29 AM
can std::set hold pointers to keys instead of the keys themselves? danibe@my-deja.com C++ 10 02-03-2006 03:44 AM
serial keys/validation keys sandeep Kanwal C++ 1 10-29-2004 06:36 PM
keyboard keys replacing mouse keys? larry Computer Support 8 09-14-2003 07:32 PM



Advertisments