I'm running ubuntu linux and I have a bluetooth mouse that I would like to capture evdev events from. The problem is that the event device can potentially be different any time I connect the mouse: sometimes it's /dev/input/event17, sometimes /dev/input/event16, etc.

/dev/input/by-id and /dev/input/by-path aren't getting populated for this device. I've seen solutions that involve parsing /proc/bus/input/devices to find the event number, but I feel like there has to be an easier way. Isn't there a symlink out in /proc or /sys that will always point to the events for a specific device? Or Maybe some udev rule that I could configure?

1 Answer 1


Use udevadm info to query device attributes, then creat udev rule which would create symlink in /dev/ to easy access the device by your custom name. See https://wiki.archlinux.org/index.php/Udev#udev_rule_example

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .