1
0
forked from drath/libratbag
Commit Graph

6 Commits

Author SHA1 Message Date
Thomas Hindoe Paaboel Andersen
3605bede48 Use udev rules/hwdb to match mice to drivers and SVGs
This adds udev rules/hwdb that sets RATBAG_DRIVER and RATBAG_SVG
properties to the event devices. We then use this property to select
the correct driver instead of checking the hardcoded list in the
drivers. Having this in a hwdb makes it easier for users to test
if drivers match their mouse with a system installed libratbag.

Each driver now has an "id" which is used to match the driver set
in RATBAG_DRIVER. A SVG can optionally be set as well.

All entries in the hwdb are currently without a name as that
information was not available in the hardcoded lists.

Note that this patch breaks the test-driver.
2015-10-09 21:05:33 +02:00
Peter Hutterer
28a94d0974 Add a test suite
Two components are added here: a test driver that takes a struct
ratbag_test_device and sets that device up as a ratbag device.
That device is returned to the tests and then checked for sanity.

The ratbag_device_new_test_device() requires the environment variable
RATBAG_TEST set, otherwise we abort. It's also 'hidden' in a separate source
file, so it won't show up in doxygen. And if the test are disabled, this
function does nothing and the test driver never gets registered.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-09-03 16:28:43 -04:00
Peter Hutterer
b1fc95ee74 tools: fix/implement ratbag-command change-button
New command syntax is:
  ratbag-command change-button 1 button 2 /dev/input/event0
  ... sets button 1 to logical button 2
  ratbag-command change-button 1 key KEY_UP /dev/input/event0
  ... sets button 1 to KEY_UP
  ratbag-command change-button 1 special "wheel up" /dev/input/event0
  ... sets button 1 to send wheel up

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-26 17:13:58 +10:00
Benjamin Tissoires
8f723d084d Do not require libevdev to compile it
we don't use it for now, so drop the requirement.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2015-08-19 14:35:03 -04:00
Benjamin Tissoires
b98477a7ec Retrieve through udev the hidraw node associated to the given input device
Most gaming mice use a specific HID protocol to configure the device.
Allow to retrieve the hidraw node associated to the mouse so we can talk
to it.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2015-08-14 17:39:23 -04:00
Peter Hutterer
3fefe97451 Scaffolding for a libratbag, a mouse configuration library
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-13 11:55:07 +10:00