For what it's worth, I think I found an answer to my question.
bobince's mention of xorg led me to look in /etc/X11/xorg.conf
. That turns out to be full of comments like
# commented out by update-manager, HAL is now used
I had heard of HAL before, and not just in 2001. I tried man -k hal
and found lshal
, which lists 133 (!) HAL devices in my PC. In the entry for one of my mice, I found
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:0b.0/usb2/2-7/2-7:1.0/input/input6/event6'
which turns out to be a directory in the file system. Exploring from there, I discovered a reference back to /dev/input/mouse3
. In fact, all my mice were sitting there in /dev/input!
Wearing my superuser cape, I was able to read /dev/input/mouse3:
root@carl-ubuntu:/dev/input# od -t x1 -w6 mouse3
0000000 09 00 00 08 00 00
*
so it turns out a left mouse click is 09 00 00 08 00 00
, consistently and repeatably.
Conclusion: I can read mouse clicks from /dev/input/mouseX. Having done chmod a+r
on those files, I can even read them from a normal user account. I need to figure out a way to stop 4 mice running wild in the hands of probably drunk people from actually interacting directly with the GUI, but that's a problem for another day.