STM32 USB HID Keyboard

Publisher:大泉人家Latest update time:2017-07-13 Source: eefocusKeywords:STM32  USB  HID  keyboard Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

USB HID keyboard reporting

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


This report cannot report ALT+F4. The specific reason is still unknown! To be discussed


Assuming that the sender has Buffer[8], then Buffer[2] stores the key values! Buffer[0], Bit0 is when the Ctrl key is pressed, Bit1 is when the Shift key is pressed, and Bit2 is when the Alt key is pressed.


Keywords:STM32  USB  HID  keyboard Reference address:STM32 USB HID Keyboard

Previous article:Use of STM32 TIMER2
Next article:STM32 IO issues

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号