1
0
forked from drath/libratbag

hidpp20: parse the key mapping

Still lack the modifiers, but this should eventually be exported as a
macro...

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
Benjamin Tissoires
2015-10-20 13:58:08 -04:00
parent 26fdafb881
commit fa3419b3c0

View File

@@ -113,6 +113,11 @@ hidpp20drv_onboard_profile_8100_read_button(struct ratbag_button *button)
button->action.type = RATBAG_BUTTON_ACTION_TYPE_BUTTON;
button->action.action.button = profile->buttons[button->index].code;
break;
case HIDPP20_BUTTON_HID_KEYBOARD:
button->action.type = RATBAG_BUTTON_ACTION_TYPE_KEY;
button->action.action.key.key = ratbag_hidraw_get_keycode_from_keyboard_usage(device,
profile->buttons[button->index].code);
break;
default:
button->action.type = RATBAG_BUTTON_ACTION_TYPE_UNKNOWN;
}