I'd like to make a python script that can run in the background but print text when a mouseevent or keyevent happens. Are there any libraries/builtin functionality to achieve this? Or any system commands I can call to get this info? Being root is no issue.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
I guess, you might use python bindings for evdev: http://packages.python.org/evdev/index.html. In tutorial they give an example for keyboard, but it should be similar for mouse events:
Take a look at pynput, for example: