USB的HID键盘 报告
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x06, // USAGE (Keyboard)
0xa1, 0x01, // COLLECTION (Application)
0x05, 0x07, //USAGE_PAGE (Keyboard)
0x19, 0x29, //USAGE_MINIMUM (Keyboard ESCAPE)
0x29, 0xe7, //USAGE_MAXIMUM (Keyboard RightAlt)
0x15, 0x00, //LOGICAL_MINIMUM (0)
0x25, 0x01, //LOGICAL_MAXIMUM (1)
0x95, 0x08, //REPORT_COUNT (8)
0x75, 0x01, //REPORT_SIZE (1)
0x81, 0x02, //INPUT (Data,Var,Abs)
0x95, 0x01, //REPORT_COUNT (1)
0x75, 0x08, //REPORT_SIZE (8)
0x81, 0x03, //INPUT (Cnst,Var,Abs)
0x95, 0x06, //REPORT_COUNT (6)
0x75, 0x08, //REPORT_SIZE (8)
0x25, 0xff, // LOGICAL_MAXIMUM (255)
0x19, 0x00, //USAGE_MINIMUM (Reserved (no event indicated))
0x29, 0x65, //USAGE_MAXIMUM (Keyboard Application)
0x81, 0x00, //INPUT (Data,Ary,Abs)
0x15, 0x01, //LOGICAL_MINIMUM (1)
0x95, 0x05, //REPORT_COUNT (5)
0x75, 0x01, //REPORT_SIZE (1)
0xc0 // END_COLLECTION
此份报告,不能报告ALT+F4,具体为什么还不知道!尚待探讨
发送的收假设有Buffer[8],则Buffer[2]存储的按键值!Buffer[0],的Bit0是Ctrl键按下,Bit1 是Shift键下,Bit2是Alt键按下。
上一篇:STM32 TIMER2的使用
下一篇:STM32 IO 问题
推荐阅读最新更新时间:2024-03-16 15:35