USB鼠标键盘数据格式以及按键键值
鼠标发送给PC的数据每次4个字节
BYTE1 BYTE2 BYTE3 BYTE4
定义分别是:
BYTE1 –
|–bit7: 1 表示 Y 坐标的变化量超出-256 ~ 255的范围,0表示没有溢出
|–bit6: 1 表示 X 坐标的变化量超出-256 ~ 255的范围,0表示没有溢出
|–bit5: Y 坐标变化的符号位,1表示负数,即鼠标向下移动
|–bit4: X 坐标变化的符号位,1表示负数,即鼠标向左移动
|–bit3: 恒为1
|–bit2: 1表示中键按下
|–bit1: 1表示右键按下
|–bit0: 1表示左键按下
BYTE2 – X坐标变化量,与byte的bit4组成9位符号数,负数表示向左移,正数表右移。用补码表示变化量
BYTE3 – Y坐标变化量,与byte的bit5组成9位符号数,负数表示向下移,正数表上移。用补码表示变化量
BYTE4 – 滚轮变化。
由于手上没有USB鼠标,对BYTE1的4-7位没有测试,对于BYTE2 BYTE3做个测试,BYTE1的4-7全为0的时候,BYTE2 BYTE3的正负表示鼠标移动方向
键盘发送给PC的数据每次8个字节
BYTE1 BYTE2 BYTE3 BYTE4 BYTE5 BYTE6 BYTE7 BYTE8
定义分别是:
BYTE1 –
|–bit0: Left Control是否按下,按下为1
|–bit1: Left Shift 是否按下,按下为1
|–bit2: Left Alt 是否按下,按下为1
|–bit3: Left GUI 是否按下,按下为1
|–bit4: Right Control是否按下,按下为1
|–bit5: Right Shift 是否按下,按下为1
|–bit6: Right Alt 是否按下,按下为1
|–bit7: Right GUI 是否按下,按下为1
BYTE2 – 暂不清楚,有的地方说是保留位
BYTE3–BYTE8 – 这六个为普通按键
键盘经过测试。
例如:键盘发送一帧数据 02 00 0x04 0x05 00 00 00 00
表示同时按下了Left Shift + ‘a’+‘b’三个键
第一列10进制键值,第二列16进制键值,第四列是按键
00 Reserved (no event indicated)9 N/A √ √ √ 4/101/104
01 Keyboard ErrorRollOver9 N/A √ √ √ 4/101/104
02 Keyboard POSTFail9 N/A √ √ √ 4/101/104
03 Keyboard ErrorUndefined9 N/A √ √ √ 4/101/104
04 Keyboard a and A4 31 √ √ √ 4/101/104
05 Keyboard b and B 50 √ √ √ 4/101/104
06 Keyboard c and C4 48 √ √ √ 4/101/104
07 Keyboard d and D 33 √ √ √ 4/101/104
08 Keyboard e and E 19 √ √ √ 4/101/104
09 Keyboard f and F 34 √ √ √ 4/101/104
0A Keyboard g and G 35 √ √ √ 4/101/104
0B Keyboard h and H 36 √ √ √ 4/101/104
0C Keyboard i and I 24 √ √ √ 4/101/104
0D Keyboard j and J 37 √ √ √ 4/101/104
0E Keyboard k and K 38 √ √ √ 4/101/104
0F Keyboard l and L 39 √ √ √ 4/101/104
10 Keyboard m and M4 52 √ √ √ 4/101/104
11 Keyboard n and N 51 √ √ √ 4/101/104
12 Keyboard o and O4 25 √ √ √ 4/101/104
13 Keyboard p and P4 26 √ √ √ 4/101/104
14 Keyboard q and Q4 17 √ √ √ 4/101/104
15 Keyboard r and R 20 √ √ √ 4/101/104
16 Keyboard s and S4 32 √ √ √ 4/101/104
17 Keyboard t and T 21 √ √ √ 4/101/104
18 Keyboard u and U 23 √ √ √ 4/101/104
19 Keyboard v and V 49 √ √ √ 4/101/104
1A Keyboard w and W4 18 √ √ √ 4/101/104
1B Keyboard x and X4 47 √ √ √ 4/101/104
1C Keyboard y and Y4 22 √ √ √ 4/101/104
1D Keyboard z and Z4 46 √ √ √ 4/101/104
1E Keyboard 1 and !4 2 √ √ √ 4/101/104
1F Keyboard 2 and @4 3 √ √ √ 4/101/104
20 Keyboard 3 and #4 4 √ √ √ 4/101/104
21 Keyboard 4 and $4 5 √ √ √ 4/101/104
22 Keyboard 5 and %4 6 √ √ √ 4/101/104
23 Keyboard 6 and ^4 7 √ √ √ 4/101/104
24 Keyboard 7 and &4 8 √ √ √ 4/101/104
25 Keyboard 8 and *4 9 √ √ √ 4/101/104
26 Keyboard 9 and (4 10 √ √ √ 4/101/104
27 Keyboard 0 and )4 11 √ √ √ 4/101/104
28 Keyboard Return (ENTER)5 43 √ √ √ 4/101/104
29 Keyboard ESCAPE 110 √ √ √ 4/101/104
2A Keyboard DELETE (Backspace)13 15 √ √ √ 4/101/104
2B Keyboard Tab 16 √ √ √ 4/101/104
2C Keyboard Spacebar 61 √ √ √ 4/101/104
2D Keyboard - and (underscore)4 12 √ √ √ 4/101/104
2E Keyboard = and +4 13 √ √ √ 4/101/104
2F Keyboard [ and {4 27 √ √ √ 4/101/104
30 Keyboard ] and }4 28 √ √ √ 4/101/104
31 Keyboard and | 29 √ √ √ 4/101/104
32 Keyboard Non-US # and ~2 42 √ √ √ 4/101/104
33 Keyboard ; and :4 40 √ √ √ 4/101/104
34 Keyboard ‘ and “4 41 √ √ √ 4/101/104
35 Keyboard Grave Accent and Tilde4 1 √ √ √ 4/101/104
36 Keyboard, and <4 53 √ √ √ 4/101/104
37 Keyboard . and >4 54 √ √ √ 4/101/104
38 Keyboard / and ?4 55 √ √ √ 4/101/104
39 Keyboard Caps Lock11 30 √ √ √ 4/101/104
3A Keyboard F1 112 √ √ √ 4/101/104
3B Keyboard F2 113 √ √ √ 4/101/104
3C Keyboard F3 114 √ √ √ 4/101/104
3D Keyboard F4 115 √ √ √ 4/101/104
3E Keyboard F5 116 √ √ √ 4/101/104
3F Keyboard F6 117 √ √ √ 4/101/104
40 Keyboard F7 118 √ √ √ 4/101/104
41 Keyboard F8 119 √ √ √ 4/101/104
42 Keyboard F9 120 √ √ √ 4/101/104
43 Keyboard F10 121 √ √ √ 4/101/104
44 Keyboard F11 122 √ √ √ 101/104
45 Keyboard F12 123 √ √ √ 101/104
46 Keyboard PrintScreen1 124 √ √ √ 101/104
47 Keyboard Scroll Lock11 125 √ √ √ 4/101/104
48 Keyboard Pause1 126 √ √ √ 101/104
49 Keyboard Insert1 75 √ √ √ 101/104
4A Keyboard Home1 80 √ √ √ 101/104
4B Keyboard PageUp1 85 √ √ √ 101/104
4C Keyboard Delete Forward1;14 76 √ √ √ 101/104
4D Keyboard End1 81 √ √ √ 101/104
4E Keyboard PageDown1 86 √ √ √ 101/104
4F Keyboard RightArrow1 89 √ √ √ 101/104
50 Keyboard LeftArrow1 79 √ √ √ 101/104
51 Keyboard DownArrow1 84 √ √ √ 101/104
52 Keyboard UpArrow1 83 √ √ √ 101/104
53 Keypad Num Lock and Clear11 90 √ √ √ 101/104
54 Keypad /1 95 √ √ √ 101/104
55 Keypad * 100 √ √ √ 4/101/104
56 Keypad - 105 √ √ √ 4/101/104
57 Keypad + 106 √ √ √ 4/101/104
58 Keypad ENTER5 108 √ √ √ 101/104
59 Keypad 1 and End 93 √ √ √ 4/101/104
5A Keypad 2 and Down Arrow 98 √ √ √ 4/101/104
5B Keypad 3 and PageDn 103 √ √ √ 4/101/104
5C Keypad 4 and Left Arrow 92 √ √ √ 4/101/104
5D Keypad 5 97 √ √ √ 4/101/104
5E Keypad 6 and Right Arrow 102 √ √ √ 4/101/104
5F Keypad 7 and Home 91 √ √ √ 4/101/104
60 Keypad 8 and Up Arrow 96 √ √ √ 4/101/104
61 Keypad 9 and PageUp 101 √ √ √ 4/101/104
62 Keypad 0 and Insert 99 √ √ √ 4/101/104
63 Keypad . and Delete 104 √ √ √ 4/101/104
64 Keyboard Non-US and |3;6 45 √ √ √ 4/101/104
65 Keyboard Application10 129 √ √ 104
66 Keyboard Power9 √ √
67 Keypad = √
68 Keyboard F13 √
69 Keyboard F14 √
6A Keyboard F15 √
6B Keyboard F16
6C Keyboard F17
6D Keyboard F18
6E Keyboard F19
6F Keyboard F20
70 Keyboard F21
71 Keyboard F22
72 Keyboard F23
73 Keyboard F24
74 Keyboard Execute √
75 Keyboard Help √
76 Keyboard Menu √
77 Keyboard Select √
78 Keyboard Stop √
79 Keyboard Again √
7A Keyboard Undo √
7B Keyboard Cut √
7C Keyboard Copy √
7D Keyboard Paste √
7E Keyboard Find √
7F Keyboard Mute √
80 Keyboard Volume Up √
81 Keyboard Volume Down √
82 Keyboard Locking Caps Lock12 √
83 Keyboard Locking Num Lock12 √
84 Keyboard Locking Scroll Lock12 √
85 Keypad Comma27 107
86 Keypad Equal Sign29
87 Keyboard International115,28 56
88 Keyboard International216
89 Keyboard International317
8A Keyboard International418
8B Keyboard International519
8C Keyboard International620
8D Keyboard International721
8E Keyboard International822
8F Keyboard International922
90 Keyboard LANG125
91 Keyboard LANG226
92 Keyboard LANG330
93 Keyboard LANG431
94 Keyboard LANG532
95 Keyboard LANG68
96 Keyboard LANG78
97 Keyboard LANG88
98 Keyboard LANG98
99 Keyboard Alternate Erase7
9A Keyboard SysReq/Attention1
9B Keyboard Cancel
9C Keyboard Clear
9D Keyboard Prior
9E Keyboard Return
9F Keyboard Separator
A0 Keyboard Out
A1 Keyboard Oper
A2 Keyboard Clear/Again
A3 Keyboard CrSel/Props
A4 Keyboard ExSel
165-175 A5-CF Reserved
B0 Keypad 00
B1 Keypad 000
B2 Thousands Separator 33
B3 Decimal Separator 33
B4 Currency Unit 34
B5 Currency Sub-unit 34
B6 Keypad (
B7 Keypad )
B8 Keypad {
B9 Keypad }
BA Keypad Tab
BB Keypad Backspace
BC Keypad A
BD Keypad B
BE Keypad C
BF Keypad D
C0 Keypad E
C1 Keypad F
C2 Keypad XOR
C3 Keypad ^
C4 Keypad %
C5 Keypad <
C6 Keypad >
C7 Keypad &
C8 Keypad &&
C9 Keypad |
CA Keypad ||
CB Keypad :
CC Keypad #
CD Keypad Space
CE Keypad @
CF Keypad !
D0 Keypad Memory Store
D1 Keypad Memory Recall
D2 Keypad Memory Clear
D3 Keypad Memory Add
D4 Keypad Memory Subtract
D5 Keypad Memory Multiply
D6 Keypad Memory Divide
D7 Keypad +/-
D8 Keypad Clear
D9 Keypad Clear Entry
DA Keypad Binary
DB Keypad Octal
DC Keypad Decimal
DD Keypad Hexadecimal
222-223 DE-DF Reserved
E0 Keyboard LeftControl 58 √ √ √ 4/101/104
E1 Keyboard LeftShift 44 √ √ √ 4/101/104
E2 Keyboard LeftAlt 60 √ √ √ 4/101/104
E3 Keyboard Left GUI10;23 127 √ √ √ 104
E4 Keyboard RightControl 64 √ √ √ 101/104
E5 Keyboard RightShift 57 √ √ √ 4/101/104
E6 Keyboard RightAlt 62 √ √ √ 101/104
E7 Keyboard Right GUI10;24 128 √ √ √ 104
232-65535 E8-FFFF Reserved
STM32 USB 鼠标+键盘 串口控制资源:
串口发送指令:
*MOS0101000000# 鼠标左键按下
*MOS0102000000# 鼠标右键按下
*MOS0103000000# 鼠标中键按下
*MOS0100000000# 鼠标抬起
*MOS01000a0000# 鼠标向+X移动0x0a个像素
*MOS01008a0000# 鼠标向-X移动0x0a补数个像素
*MOS0100000a00# 鼠标向+Y移动0x0a个像素
*MOS0100008a00# 鼠标向-Y移动0x0a补数个像素
*MOS010000000a# 鼠标向上滚动0x0a个像素
*MOS010000008a# 鼠标向下滚动0x0a补数个像素
*KEY0000040000000000# 输入a
*KEY0200040000000000# 输入A
具体键值请参考上方图片
USB鼠标键盘数据格式以及按键键值
鼠标发送给PC的数据每次4个字节
BYTE1 BYTE2 BYTE3 BYTE4
定义分别是:
BYTE1 –
|–bit7: 1 表示 Y 坐标的变化量超出-256 ~ 255的范围,0表示没有溢出
|–bit6: 1 表示 X 坐标的变化量超出-256 ~ 255的范围,0表示没有溢出
|–bit5: Y 坐标变化的符号位,1表示负数,即鼠标向下移动
|–bit4: X 坐标变化的符号位,1表示负数,即鼠标向左移动
|–bit3: 恒为1
|–bit2: 1表示中键按下
|–bit1: 1表示右键按下
|–bit0: 1表示左键按下
BYTE2 – X坐标变化量,与byte的bit4组成9位符号数,负数表示向左移,正数表右移。用补码表示变化量
BYTE3 – Y坐标变化量,与byte的bit5组成9位符号数,负数表示向下移,正数表上移。用补码表示变化量
BYTE4 – 滚轮变化。
由于手上没有USB鼠标,对BYTE1的4-7位没有测试,对于BYTE2 BYTE3做个测试,BYTE1的4-7全为0的时候,BYTE2 BYTE3的正负表示鼠标移动方向
键盘发送给PC的数据每次8个字节
BYTE1 BYTE2 BYTE3 BYTE4 BYTE5 BYTE6 BYTE7 BYTE8
定义分别是:
BYTE1 –
|–bit0: Left Control是否按下,按下为1
|–bit1: Left Shift 是否按下,按下为1
|–bit2: Left Alt 是否按下,按下为1
|–bit3: Left GUI 是否按下,按下为1
|–bit4: Right Control是否按下,按下为1
|–bit5: Right Shift 是否按下,按下为1
|–bit6: Right Alt 是否按下,按下为1
|–bit7: Right GUI 是否按下,按下为1
BYTE2 – 暂不清楚,有的地方说是保留位
BYTE3–BYTE8 – 这六个为普通按键
键盘经过测试。
例如:键盘发送一帧数据 02 00 0x04 0x05 00 00 00 00
表示同时按下了Left Shift + ‘a’+‘b’三个键
第一列10进制键值,第二列16进制键值,第四列是按键
00 Reserved (no event indicated)9 N/A √ √ √ 4/101/104
01 Keyboard ErrorRollOver9 N/A √ √ √ 4/101/104
02 Keyboard POSTFail9 N/A √ √ √ 4/101/104
03 Keyboard ErrorUndefined9 N/A √ √ √ 4/101/104
04 Keyboard a and A4 31 √ √ √ 4/101/104
05 Keyboard b and B 50 √ √ √ 4/101/104
06 Keyboard c and C4 48 √ √ √ 4/101/104
07 Keyboard d and D 33 √ √ √ 4/101/104
08 Keyboard e and E 19 √ √ √ 4/101/104
09 Keyboard f and F 34 √ √ √ 4/101/104
0A Keyboard g and G 35 √ √ √ 4/101/104
0B Keyboard h and H 36 √ √ √ 4/101/104
0C Keyboard i and I 24 √ √ √ 4/101/104
0D Keyboard j and J 37 √ √ √ 4/101/104
0E Keyboard k and K 38 √ √ √ 4/101/104
0F Keyboard l and L 39 √ √ √ 4/101/104
10 Keyboard m and M4 52 √ √ √ 4/101/104
11 Keyboard n and N 51 √ √ √ 4/101/104
12 Keyboard o and O4 25 √ √ √ 4/101/104
13 Keyboard p and P4 26 √ √ √ 4/101/104
14 Keyboard q and Q4 17 √ √ √ 4/101/104
15 Keyboard r and R 20 √ √ √ 4/101/104
16 Keyboard s and S4 32 √ √ √ 4/101/104
17 Keyboard t and T 21 √ √ √ 4/101/104
18 Keyboard u and U 23 √ √ √ 4/101/104
19 Keyboard v and V 49 √ √ √ 4/101/104
1A Keyboard w and W4 18 √ √ √ 4/101/104
1B Keyboard x and X4 47 √ √ √ 4/101/104
1C Keyboard y and Y4 22 √ √ √ 4/101/104
1D Keyboard z and Z4 46 √ √ √ 4/101/104
1E Keyboard 1 and !4 2 √ √ √ 4/101/104
1F Keyboard 2 and @4 3 √ √ √ 4/101/104
20 Keyboard 3 and #4 4 √ √ √ 4/101/104
21 Keyboard 4 and $4 5 √ √ √ 4/101/104
22 Keyboard 5 and %4 6 √ √ √ 4/101/104
23 Keyboard 6 and ^4 7 √ √ √ 4/101/104
24 Keyboard 7 and &4 8 √ √ √ 4/101/104
25 Keyboard 8 and *4 9 √ √ √ 4/101/104
26 Keyboard 9 and (4 10 √ √ √ 4/101/104
27 Keyboard 0 and )4 11 √ √ √ 4/101/104
28 Keyboard Return (ENTER)5 43 √ √ √ 4/101/104
29 Keyboard ESCAPE 110 √ √ √ 4/101/104
2A Keyboard DELETE (Backspace)13 15 √ √ √ 4/101/104
2B Keyboard Tab 16 √ √ √ 4/101/104
2C Keyboard Spacebar 61 √ √ √ 4/101/104
2D Keyboard - and (underscore)4 12 √ √ √ 4/101/104
2E Keyboard = and +4 13 √ √ √ 4/101/104
2F Keyboard [ and {4 27 √ √ √ 4/101/104
30 Keyboard ] and }4 28 √ √ √ 4/101/104
31 Keyboard and | 29 √ √ √ 4/101/104
32 Keyboard Non-US # and ~2 42 √ √ √ 4/101/104
33 Keyboard ; and :4 40 √ √ √ 4/101/104
34 Keyboard ‘ and “4 41 √ √ √ 4/101/104
35 Keyboard Grave Accent and Tilde4 1 √ √ √ 4/101/104
36 Keyboard, and <4 53 √ √ √ 4/101/104
37 Keyboard . and >4 54 √ √ √ 4/101/104
38 Keyboard / and ?4 55 √ √ √ 4/101/104
39 Keyboard Caps Lock11 30 √ √ √ 4/101/104
3A Keyboard F1 112 √ √ √ 4/101/104
3B Keyboard F2 113 √ √ √ 4/101/104
3C Keyboard F3 114 √ √ √ 4/101/104
3D Keyboard F4 115 √ √ √ 4/101/104
3E Keyboard F5 116 √ √ √ 4/101/104
3F Keyboard F6 117 √ √ √ 4/101/104
40 Keyboard F7 118 √ √ √ 4/101/104
41 Keyboard F8 119 √ √ √ 4/101/104
42 Keyboard F9 120 √ √ √ 4/101/104
43 Keyboard F10 121 √ √ √ 4/101/104
44 Keyboard F11 122 √ √ √ 101/104
45 Keyboard F12 123 √ √ √ 101/104
46 Keyboard PrintScreen1 124 √ √ √ 101/104
47 Keyboard Scroll Lock11 125 √ √ √ 4/101/104
48 Keyboard Pause1 126 √ √ √ 101/104
49 Keyboard Insert1 75 √ √ √ 101/104
4A Keyboard Home1 80 √ √ √ 101/104
4B Keyboard PageUp1 85 √ √ √ 101/104
4C Keyboard Delete Forward1;14 76 √ √ √ 101/104
4D Keyboard End1 81 √ √ √ 101/104
4E Keyboard PageDown1 86 √ √ √ 101/104
4F Keyboard RightArrow1 89 √ √ √ 101/104
50 Keyboard LeftArrow1 79 √ √ √ 101/104
51 Keyboard DownArrow1 84 √ √ √ 101/104
52 Keyboard UpArrow1 83 √ √ √ 101/104
53 Keypad Num Lock and Clear11 90 √ √ √ 101/104
54 Keypad /1 95 √ √ √ 101/104
55 Keypad * 100 √ √ √ 4/101/104
56 Keypad - 105 √ √ √ 4/101/104
57 Keypad + 106 √ √ √ 4/101/104
58 Keypad ENTER5 108 √ √ √ 101/104
59 Keypad 1 and End 93 √ √ √ 4/101/104
5A Keypad 2 and Down Arrow 98 √ √ √ 4/101/104
5B Keypad 3 and PageDn 103 √ √ √ 4/101/104
5C Keypad 4 and Left Arrow 92 √ √ √ 4/101/104
5D Keypad 5 97 √ √ √ 4/101/104
5E Keypad 6 and Right Arrow 102 √ √ √ 4/101/104
5F Keypad 7 and Home 91 √ √ √ 4/101/104
60 Keypad 8 and Up Arrow 96 √ √ √ 4/101/104
61 Keypad 9 and PageUp 101 √ √ √ 4/101/104
62 Keypad 0 and Insert 99 √ √ √ 4/101/104
63 Keypad . and Delete 104 √ √ √ 4/101/104
64 Keyboard Non-US and |3;6 45 √ √ √ 4/101/104
65 Keyboard Application10 129 √ √ 104
66 Keyboard Power9 √ √
67 Keypad = √
68 Keyboard F13 √
69 Keyboard F14 √
6A Keyboard F15 √
6B Keyboard F16
6C Keyboard F17
6D Keyboard F18
6E Keyboard F19
6F Keyboard F20
70 Keyboard F21
71 Keyboard F22
72 Keyboard F23
73 Keyboard F24
74 Keyboard Execute √
75 Keyboard Help √
76 Keyboard Menu √
77 Keyboard Select √
78 Keyboard Stop √
79 Keyboard Again √
7A Keyboard Undo √
7B Keyboard Cut √
7C Keyboard Copy √
7D Keyboard Paste √
7E Keyboard Find √
7F Keyboard Mute √
80 Keyboard Volume Up √
81 Keyboard Volume Down √
82 Keyboard Locking Caps Lock12 √
83 Keyboard Locking Num Lock12 √
84 Keyboard Locking Scroll Lock12 √
85 Keypad Comma27 107
86 Keypad Equal Sign29
87 Keyboard International115,28 56
88 Keyboard International216
89 Keyboard International317
8A Keyboard International418
8B Keyboard International519
8C Keyboard International620
8D Keyboard International721
8E Keyboard International822
8F Keyboard International922
90 Keyboard LANG125
91 Keyboard LANG226
92 Keyboard LANG330
93 Keyboard LANG431
94 Keyboard LANG532
95 Keyboard LANG68
96 Keyboard LANG78
97 Keyboard LANG88
98 Keyboard LANG98
99 Keyboard Alternate Erase7
9A Keyboard SysReq/Attention1
9B Keyboard Cancel
9C Keyboard Clear
9D Keyboard Prior
9E Keyboard Return
9F Keyboard Separator
A0 Keyboard Out
A1 Keyboard Oper
A2 Keyboard Clear/Again
A3 Keyboard CrSel/Props
A4 Keyboard ExSel
165-175 A5-CF Reserved
B0 Keypad 00
B1 Keypad 000
B2 Thousands Separator 33
B3 Decimal Separator 33
B4 Currency Unit 34
B5 Currency Sub-unit 34
B6 Keypad (
B7 Keypad )
B8 Keypad {
B9 Keypad }
BA Keypad Tab
BB Keypad Backspace
BC Keypad A
BD Keypad B
BE Keypad C
BF Keypad D
C0 Keypad E
C1 Keypad F
C2 Keypad XOR
C3 Keypad ^
C4 Keypad %
C5 Keypad <
C6 Keypad >
C7 Keypad &
C8 Keypad &&
C9 Keypad |
CA Keypad ||
CB Keypad :
CC Keypad #
CD Keypad Space
CE Keypad @
CF Keypad !
D0 Keypad Memory Store
D1 Keypad Memory Recall
D2 Keypad Memory Clear
D3 Keypad Memory Add
D4 Keypad Memory Subtract
D5 Keypad Memory Multiply
D6 Keypad Memory Divide
D7 Keypad +/-
D8 Keypad Clear
D9 Keypad Clear Entry
DA Keypad Binary
DB Keypad Octal
DC Keypad Decimal
DD Keypad Hexadecimal
222-223 DE-DF Reserved
E0 Keyboard LeftControl 58 √ √ √ 4/101/104
E1 Keyboard LeftShift 44 √ √ √ 4/101/104
E2 Keyboard LeftAlt 60 √ √ √ 4/101/104
E3 Keyboard Left GUI10;23 127 √ √ √ 104
E4 Keyboard RightControl 64 √ √ √ 101/104
E5 Keyboard RightShift 57 √ √ √ 4/101/104
E6 Keyboard RightAlt 62 √ √ √ 101/104
E7 Keyboard Right GUI10;24 128 √ √ √ 104
232-65535 E8-FFFF Reserved
STM32 USB 鼠标+键盘 串口控制资源:
串口发送指令:
*MOS0101000000# 鼠标左键按下
*MOS0102000000# 鼠标右键按下
*MOS0103000000# 鼠标中键按下
*MOS0100000000# 鼠标抬起
*MOS01000a0000# 鼠标向+X移动0x0a个像素
*MOS01008a0000# 鼠标向-X移动0x0a补数个像素
*MOS0100000a00# 鼠标向+Y移动0x0a个像素
*MOS0100008a00# 鼠标向-Y移动0x0a补数个像素
*MOS010000000a# 鼠标向上滚动0x0a个像素
*MOS010000008a# 鼠标向下滚动0x0a补数个像素
*KEY0000040000000000# 输入a
*KEY0200040000000000# 输入A
具体键值请参考上方图片
举报