<br>I think you may have to send a message to the event look of you application manually,<br>to let it know you have a key event for it. You may also need to temporarily enable/disbale the keydown event handler for pyHook, or else you wont be able to easily break out of that code (at least I couldn't) :-)<br>
You might want to post your message on the Python Win32 list. This issue is specific to Window event handling and there are a lot of people on that<br>list who probably can help with this specific issue.<br><br>Message: 7<br>
Date: Tue, 29 Apr 2008 12:46:29 +0530<br>
From: "Muguntharaj Subramanian" <<a href="mailto:mugunth@gmail.com">mugunth@gmail.com</a>><br>
Subject: [Tutor] pyHook related doubt<br>
To: <a href="mailto:Tutor@python.org">Tutor@python.org</a><br>
Message-ID:<br>
<<a href="mailto:8dd9fd0804290016p5a6c91ebx249eb05e87bdf451@mail.gmail.com">8dd9fd0804290016p5a6c91ebx249eb05e87bdf451@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi All,<br>
I am trying to create a custom keyboard driver program(like<br>
<a href="http://www.tavultesoft.com/keyman/" target="_blank">http://www.tavultesoft.com/keyman/</a> ) for windows using python.<br>
If this python script is run in the background, what is typed should be<br>
converted into my native language.<br>
For example if I hit 'a' in the keyboard, the output of the keyboard should<br>
be a tamil unicode character(which will be pre-defined by user).<br>
<br>
For making such program, i tried exploring pyHook based on this tutorial.<br>
<a href="http://mindtrove.info/articles/monitoring-global-input-with-pyhook/" target="_blank">http://mindtrove.info/articles/monitoring-global-input-with-pyhook/</a><br>
<br>
>From the tutorial, I have learned to capture the keys typed, but couldn't<br>
understand how to change the keys before they reach the windows<br>
applications.<br>
<br>
Attached is the sample code I used (In this code basically i am trying to<br>
change all the keys typed to 'b' in this code, but its not working )<br>
<br>
Please guide me on how i can change the keys sent to the application using<br>
pyHook. Or is there any other library that I can make use of to create such<br>
application.