[python-win32] pyHook on Win98; no events

RayS rays at blue-cove.com
Wed Feb 15 16:32:46 CET 2006


	
To debug pyKeyLogger, I wrote this with pyHook (and compiled with 
py2exe on Win2K), which prints the ascii codes as expected on Win2K:

import pyHook
import time
import pythoncom
def OnKeyboardEvent(event):
   print event.Ascii
def main():
   hm = pyHook.HookManager()
   hm.KeyDown = OnKeyboardEvent
   hm.HookKeyboard()
   while True:
     pythoncom.PumpMessages()
if __name__ == '__main__':
main()

It silently does nothing on Win98...
What is needed? py2exe on 98? I did test it on a fresh install of 98...
I also just thought about trying loading ANSI.SYS at boot, but I 
can't test until tomorrow.

Thanks,
Ray 



More information about the Python-win32 mailing list