From e6064731988ee7cb20173ef57d796d836d31e52a Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Fri, 9 Oct 2015 17:19:16 -0400 Subject: [PATCH] update README update README to reflect the hwdb change. Signed-off-by: Benjamin Tissoires --- README.md | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7ed6a52e..86f568d2 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,25 @@ library in the future, if other projects require it. Adding Devices -------------- + +As of commit 3605bede4 libratbag now uses a hwdb entry to match the device +with the drivers. + Your device may already supported by one of our drivers. If so, you can -enable it by adding the device vendor-id/product-id to the static table. For -example, for a HID++ 1.0 device, edit the driver-hidpp10.c file and add an -entry in the hidpp10drv_table. For the other drivers, look for the -driver-{drivername}.c file and do the same. +enable it by adding the device vendor-id/product-id to the hwdb file in +`hwdb/70-libratbag-mouse.hwdb`. For example, for a HID++ 1.0 device, edit +the 70-libratbag-mouse.hwdb file and add an entry with `RATBAG_DRIVER=hidpp10`. +For the other drivers, look for the id of the driver in driver-{drivername}.c +file and do the same. + +Then install libratbag, run: +``` +sudo udevadm hwdb --update +sudo udevadm control --reload +``` + +And unplug/replug your mouse. `RATBAG_DRIVER` should appear in the udev +properties of your device with the value you previously set. If the device doesn't work, you'll have to start reverse-engineering the device-specific protocol. Good luck :)