format of /dev/input/event*?
问题 What is the \"format\" of the character devices located in /dev/input/event* ? In other words, how can I decode the character stream? A python example would be greatly appreciated. I\'ve been googling like crazy to no avail... please help. 回答1: right here in the Input.py module. You'll also need the event.py module. 回答2: A simple and raw reader can be just done using: #!/usr/bin/python import struct import time import sys infile_path = "/dev/input/event" + (sys.argv[1] if len(sys.argv) > 1