I am developing an app on python which will check for user inactivity. Is there a way to check for key press and mouse move events in linux?
相关问题
- 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
You could monitor the /dev/input/* files, when a key is pressed/the mouse is moved it is written to one of those files.
Try this for example:
Now that I think of it, it might be better to use something like xidle to detect inactivity.