Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   generate keyboard/mouse event under windows (http://www.velocityreviews.com/forums/t695346-generate-keyboard-mouse-event-under-windows.html)

Ray 08-19-2009 05:44 PM

generate keyboard/mouse event under windows
 
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

yaka 08-19-2009 06:07 PM

Re: generate keyboard/mouse event under windows
 
Read this and see if it helps:

http://kvance.livejournal.com/985732.html

Ray 08-19-2009 06:55 PM

Re: generate keyboard/mouse event under windows
 
On Aug 19, 2:07*pm, yaka <gu.yakahug...@gmail.com> 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' ?

Dennis Lee Bieber 08-20-2009 04:42 AM

Re: generate keyboard/mouse event under windows
 
On Wed, 19 Aug 2009 11:55:25 -0700 (PDT), Ray <rui.vapps@gmail.com>
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
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/



All times are GMT. The time now is 11:49 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.