修改了键盘描述符和HID_KEYBOARD_REPORT_DESC_SIZE,便可以了
键盘描述符如下:
0x05,0x01,
0x09,0x06,
0xa1,0x01,
0x05,0x07,
0x19,0xe0,
0x29,0xe7,
0x15,0x00,
0x25,0x01,
0x95,0x08,
0x75,0x01,
0x81,0x02,
0x95,0x01,
0x75,0x08,
0x81,0x03,
0x95,0x06,
0x75,0x08,
0x15,0x00,
0x25,0xff,
0x05,0x07,
0x19,0x00,
0x29,0x65,
0x81,0x00,
0x25,0x01,
0x95,0x05,
0x75,0x01,
0x05,0x08,
0x19,0x01,
0x29,0x05,
0x91,0x02,
0x95,0x01,
0x75,0x03,
0x91,0x03,
0xc0
使用 STM32CubeIDE 开发基于 STM32 的 HID 鼠标或键盘STM32CubeIDE 安装 STM32CubeIDE 是 ST 官方新出的一款集成了 CubeMX 的开发环境,上手很简单。下载官方安装包即可,需要注册。之后一路 nex...