mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
hidpp20: enable disabling buttons on onboard profiles (0x8100)
Signed-off-by: Filipe Laíns <lains@archlinux.org>
This commit is contained in:
committed by
Yaroslav Chvanov
parent
39b8f2bce2
commit
c4cf24308a
@@ -214,6 +214,9 @@ hidpp20drv_read_button_8100(struct ratbag_button *button)
|
||||
switch (profile->buttons[button->index].any.type) {
|
||||
case HIDPP20_BUTTON_HID_TYPE:
|
||||
switch (profile->buttons[button->index].subany.subtype) {
|
||||
case HIDPP20_BUTTON_HID_TYPE_NOOP:
|
||||
button->action.type = RATBAG_BUTTON_ACTION_TYPE_NONE;
|
||||
break;
|
||||
case HIDPP20_BUTTON_HID_TYPE_MOUSE:
|
||||
button->action.type = RATBAG_BUTTON_ACTION_TYPE_BUTTON;
|
||||
button->action.action.button = profile->buttons[button->index].button.buttons;
|
||||
@@ -614,6 +617,9 @@ hidpp20drv_update_button_8100(struct ratbag_button *button)
|
||||
profile->buttons[button->index].special.type = HIDPP20_BUTTON_SPECIAL;
|
||||
profile->buttons[button->index].special.special = code;
|
||||
break;
|
||||
case RATBAG_BUTTON_ACTION_TYPE_NONE:
|
||||
profile->buttons[button->index].disabled.type = HIDPP20_BUTTON_HID_TYPE_NOOP;
|
||||
break;
|
||||
default:
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user