problem with keys combination!

Discussion in 'Python' started by Alex, Jul 10, 2009.

  1. Alex

    Alex Guest

    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)
     
    Alex, Jul 10, 2009
    #1
    1. Advertising

  2. 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/...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



    --
    Steven
     
    Steven D'Aprano, Jul 10, 2009
    #2
    1. Advertising

  3. Alex

    Alex Guest

    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
     
    Alex, Jul 10, 2009
    #3
  4. Alex

    Terry Reedy Guest

    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?
     
    Terry Reedy, Jul 10, 2009
    #4
  5. Alex

    Alex Guest


    > 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
     
    Alex, Jul 11, 2009
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sandeep Kanwal

    serial keys/validation keys

    sandeep Kanwal, Oct 29, 2004, in forum: C++
    Replies:
    1
    Views:
    593
    Mike Wahler
    Oct 29, 2004
  2. Harry George
    Replies:
    9
    Views:
    721
    sonal
    Jun 13, 2006
  3. Replies:
    10
    Views:
    736
    Daniel T.
    Feb 3, 2006
  4. alan
    Replies:
    3
    Views:
    374
    Victor Bazarov
    Nov 28, 2007
  5. A. Farber
    Replies:
    10
    Views:
    244
    A. Farber
    Jun 12, 2004
Loading...

Share This Page