From fa3419b3c03cd6be15385d82097bca8849990d19 Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Tue, 20 Oct 2015 13:58:08 -0400 Subject: [PATCH] hidpp20: parse the key mapping Still lack the modifiers, but this should eventually be exported as a macro... Signed-off-by: Benjamin Tissoires --- src/driver-hidpp20.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/driver-hidpp20.c b/src/driver-hidpp20.c index 8cbd7101..1137c886 100644 --- a/src/driver-hidpp20.c +++ b/src/driver-hidpp20.c @@ -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; }