python - Recording keystrokes with pyHook -


i've been trying work time (to keyid print in text, a="a", not a=125.)

here code, either prints "none" , prints wrong type, or keyid again. (with different idtoname arguments)

import pyhook pyhook import hookmanager pyhook.hookmanager import hookconstants import time import pythoncom    def onkeyboardevent(event):     print hookconstants.idtoname(event.ascii)  hm = pyhook.hookmanager() hm.keydown = onkeyboardevent hm.hookkeyboard()  while true:     pythoncom.pumpmessages() 

why not use event.key? xx


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -