Mir

Comment 12 for bug 1233944

Revision history for this message
Martin Pitt (pitti) wrote :

For the record, http://www.freedesktop.org/software/systemd/libudev/ is the reference documentation (also in libudev-dev); you want the udev_monitor_* bits for receiving events, the enumerate bits for detecting devices at startup (coldplug), and udev_device_* for querying for attributes and properties (grep "udevadm info --export-db" for "input" about available properties, such as ID_INPUT_KEYBOARD=1).

http://www.signal11.us/oss/udev/ has an useful intro and example how to use this.