Python capture Keystrokes values in text file on OS X
I am trying to monitor keystrokes on my Macbook on order to build a statistics analyzer. But how can I isolate the chars from "event" which is more something like : NSEvent: type=KeyDown loc=(850,248) time=66551.8 flags=0x100 win=0x0 winNum=0 ctxt=0x0 chars="l" unmodchars="l" repeat=0 keyCode=37 So do anyone know how to, based on the script posted below, fulfill a .txt doc with the value of chars (from NSEvent) ? I need a text file with a the pressed keys in order to run my other script on it and analyze the frequency etc... Thanks in advance ;) #!/usr/bin/python # -*- coding: utf-8 -*- from