Search code examples
pythonmacoskeyboard-hook

Can I use Python to capture keyboard and mouse events in OSX?


I'm trying to write a simple macro recorder in Python for OSX - something which can capture mouse and key events as the script runs in the background and replay them. I can use autopy for the latter, is there a similarly simple library for the former?


Solution

  • There doesn't seem to be a way of doing this in Python on OSX.