The OS X tool for Logitech's gaming mouse did not allow button-profiles on the
G500s, but DPI modes could be configured. This is an issue with the software,
not the device itself since the device supports muliple profiles. So the
original assumption that there are devices that have profiles for DPIs but not
buttons is likely wrong, the devices we looked at so far all have profiles
with a set of DPI modes in it, one of which is currently active.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
We don't know the HID++ 1.0 request to check for the number of buttons or
profiles, this is the next-best thing.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
and relocate the raw value 0 of RATBAG_BUTTON_TYPE_NONE to be below 0x06.
The windows application sets 0x06 when disabling a button.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Not that we can configure much, but 0x1b00 sends 5 buttons, which is
the reality, so trying to include it too.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Profiles are... interesting
https://github.com/cvuchener/g500/blob/master/doc/profile.md is pretty
detailed on the information, but there's some oddities.
The profile configured on my mouse is on page 5, not sure if that's the OS X
logitech tool though (which doesn't do profile configuration btw). Pages 3 and
3 are valid too, the rest looks to be garbage.
There's probably some magic string to detect a profile (cvuchener says maybe
FF 00 00 80), so more profiles may be lying around elsewhere in memory...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This also changes from the "toggle" to a plain "set". If a caller needs to
toggle a specific function, it can run get + set instead.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Only enabled for 4 leds and I'm not even sure they're the same on all
devices. Still, works on the G500s so that's a good enough start.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Missing return statement caused everything to be freed again. And the device
we initialized was discarded too.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Looks a bit more like the hidpp20 driver now, and easier to get a handle on
everything. Command-specific functions/defines are grouped together and sorted
by command index.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Only two receiver-specific requests have a 0-based index, everything else
wants 1-indexed devices. This currently makes it impossible to address wired
devices with a device index of 0. Switch it around, so that we use a 1-based
index.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Still try to run the other commands though, they're not receiver-related and
may work on a device that's not on a unifying receiver.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>