From 76d305458339b96d812eb319aa125fb09c5608ed Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Mon, 6 Jan 2025 10:50:59 +0100 Subject: [PATCH] hog_host_demo: use constants from btstack_hid.h, fix use of right shift key --- example/hog_host_demo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/hog_host_demo.c b/example/hog_host_demo.c index dd1efcf86..1b06c653c 100644 --- a/example/hog_host_demo.c +++ b/example/hog_host_demo.c @@ -185,10 +185,10 @@ static void hid_handle_input_report(uint8_t service_index, const uint8_t * repor uint16_t usage; int32_t value; btstack_hid_parser_get_field(&parser, &usage_page, &usage, &value); - if (usage_page != 0x07) continue; + if (usage_page != HID_USAGE_PAGE_KEYBOARD) continue; switch (usage){ - case 0xe1: - case 0xe6: + case HID_USAGE_KEY_KEYBOARD_LEFTSHIFT: + case HID_USAGE_KEY_KEYBOARD_RIGHTSHIFT: if (value){ shift = 1; }