I am trying to make a key logger for Mac OS for one of my research projects. I have C code that will capture keystrokes and write them to a text file. (The following code I extracted some not important things)
Now I need to do like PyHook, instead of writing data to a text file, pass the Python callback function to C code and make it pass the input key to Python, so I can do the necessary analysis using Python.
I'm looking for how to do this, but to be honest, I have no idea how to approach this, since I'm not used to programming in C or Python extensions. Any help would be greatly appreciated.
#include <Carbon/Carbon.h>
source share