[python-win32] pyHook related doubt

Muguntharaj Subramanian mugunth at gmail.com
Thu May 1 20:43:46 CEST 2008


Hi All,
I am resending this from tutor list since this seems to be appropriate place
to ask this question.
I am trying to create a custom keyboard driver program(like
http://www.tavultesoft.com/keyman/ ) for windows using python.
If this python script is run in the background, what is typed should be
converted into my native language.
For example if I hit 'a' in the keyboard, the output of the keyboard should
be a tamil unicode character(which will be pre-defined by user).

For making such program, I tried exploring pyHook based on this tutorial.
http://mindtrove.info/articles/monitoring-global-input-with-pyhook/

>From the tutorial, I have learned to capture the keys typed, but couldn't
understand how to change the keys before they reach the windows
applications.

Attached is the sample code I used (In this code basically I am trying to
change all the keys typed to 'b' in this code, but its not working )

Please guide me on how i can change the keys sent to the application using
pyHook. Or is there any other library that I can make use of to create such
application.

Regards,
Mugunth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20080502/ffb956e1/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyhook-example.py
Type: text/x-python
Size: 1038 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-win32/attachments/20080502/ffb956e1/attachment.py>


More information about the python-win32 mailing list