Add media keys support to USB keyboard with NRF52833.

At the company I work for we are developing a keyboard with mouse capabilities via USB and BLE using the NRF5 17.1.0 SDK.

We create the USB HID with the following SDK macro:

APP_USBD_HID_KBD_GLOBAL_DEF(keyboard_hid_class,
                             USBD_KEYBOARD_INTERFACE,
                             USBD_KEYBOARD_EPIN,
                             usb_keyboard_ev_handler,
                             APP_USBD_HID_SUBCLASS_BOOT);

APP_USBD_HID_MOUSE_GLOBAL_DEF(mouse_hid_class,
                               USBD_MOUSE_INTERFACE,
                               USBD_MOUSE_EPIN,
                               USB_MOUSE_BUTTON_COUNT,
                               usb_mouse_ev_handler,
                               APP_USBD_HID_SUBCLASS_BOOT);

// Add mouse descriptors to the USB HID descriptors.
class_inst_mouse = app_usbd_hid_mouse_class_inst_get(&mouse_hid_class);;
app_usbd_class_append(class_inst_mouse);

// Add keyboard descriptors to the USB HID descriptors.
class_inst_keyboard = app_usbd_hid_kbd_class_inst_get(&keyboard_hid_class);
app_usbd_class_append(class_inst_keyboard);

The problem is that we need the keyboard to also have media keys.
Any idea how to achieve adding support for media keys to the HID created by this macro??


Thanks in advance.

Parents Reply Children
No Data
Related