generate keyboard/mouse event under windows

Discussion in 'Python' started by Ray, Aug 19, 2009.

  1. Ray

    Ray Guest

    Hi,

    Anyone can give some help on how to generate keyboard mouse event
    under windows? (python 2.5)

    I tried pyhook, I only know how to monitor the keyboard/mouse events.
    but don't know how to generate/send the the event.

    thanks for any help.

    -Ray
     
    Ray, Aug 19, 2009
    #1
    1. Advertising

  2. Ray

    yaka Guest

    yaka, Aug 19, 2009
    #2
    1. Advertising

  3. Ray

    Ray Guest

    On Aug 19, 2:07 pm, yaka <> wrote:
    > Read this and see if it helps:
    >
    > http://kvance.livejournal.com/985732.html


    is there a way to generate a 'true' keyboard event? (works like user
    pressed a key on keyboard)
    not send the 'send keyboard event to application' ?
     
    Ray, Aug 19, 2009
    #3
  4. On Wed, 19 Aug 2009 11:55:25 -0700 (PDT), Ray <>
    declaimed the following in gmane.comp.python.general:

    > is there a way to generate a 'true' keyboard event? (works like user
    > pressed a key on keyboard)
    > not send the 'send keyboard event to application' ?


    I suspect only by creating a privileged OS service...

    In all likelihood, the OS itself is using "send keyboard event to
    application" to forward keyboard events to whatever application it
    believes has the current focus.

    On the Amiga, you'd do it by inserting a keyboard event into the
    input of the, uhm, Input process (which had the highest priority in the
    OS). Since the Amiga didn't have process specific virtual memory, this
    was easy to do.

    I don't know if there is a hook for inserting events BEFORE the OS
    handles them...
    --
    Wulfraed Dennis Lee Bieber KD6MOG
    HTTP://wlfraed.home.netcom.com/
     
    Dennis Lee Bieber, Aug 20, 2009
    #4
    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. Bas Mekel

    Unable to use mouse or keyboard

    Bas Mekel, Oct 15, 2003, in forum: Java
    Replies:
    0
    Views:
    345
    Bas Mekel
    Oct 15, 2003
  2. Replies:
    0
    Views:
    365
  3. Replies:
    2
    Views:
    519
    Thomas Fritsch
    Feb 7, 2005
  4. Peter

    keyboard, mouse and Win98

    Peter, Jul 25, 2003, in forum: C++
    Replies:
    0
    Views:
    344
    Peter
    Jul 25, 2003
  5. tom arnall
    Replies:
    6
    Views:
    1,305
    Ian Shef
    Jan 18, 2007
Loading...

Share This Page