I think you may have to send a message to the event look of you application manually, 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) :-) 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 list who probably can help with this specific issue.
Message: 7 Date: Tue, 29 Apr 2008 12:46:29 +0530 From: "Muguntharaj Subramanian" <[EMAIL PROTECTED]> Subject: [Tutor] pyHook related doubt To: Tutor@python.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="utf-8" Hi All, 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.
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor