You can review the HID example within STM32CubeF4 MCU package.
When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks