yjx-sdk-mouse 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +287 -0
- package/dist/constants.d.ts +79 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +100 -0
- package/dist/constants.js.map +1 -0
- package/dist/controllers/button.d.ts +15 -0
- package/dist/controllers/button.d.ts.map +1 -0
- package/dist/controllers/button.js +40 -0
- package/dist/controllers/button.js.map +1 -0
- package/dist/controllers/device.d.ts +19 -0
- package/dist/controllers/device.d.ts.map +1 -0
- package/dist/controllers/device.js +111 -0
- package/dist/controllers/device.js.map +1 -0
- package/dist/controllers/dpi.d.ts +15 -0
- package/dist/controllers/dpi.d.ts.map +1 -0
- package/dist/controllers/dpi.js +40 -0
- package/dist/controllers/dpi.js.map +1 -0
- package/dist/controllers/macro.d.ts +18 -0
- package/dist/controllers/macro.d.ts.map +1 -0
- package/dist/controllers/macro.js +31 -0
- package/dist/controllers/macro.js.map +1 -0
- package/dist/controllers/other.d.ts +17 -0
- package/dist/controllers/other.d.ts.map +1 -0
- package/dist/controllers/other.js +29 -0
- package/dist/controllers/other.js.map +1 -0
- package/dist/controllers/performance.d.ts +10 -0
- package/dist/controllers/performance.d.ts.map +1 -0
- package/dist/controllers/performance.js +28 -0
- package/dist/controllers/performance.js.map +1 -0
- package/dist/device/index.d.ts +57 -0
- package/dist/device/index.d.ts.map +1 -0
- package/dist/device/index.js +341 -0
- package/dist/device/index.js.map +1 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +102 -0
- package/dist/index.js.map +1 -0
- package/dist/protocol/command-presets.d.ts +11 -0
- package/dist/protocol/command-presets.d.ts.map +1 -0
- package/dist/protocol/command-presets.js +89 -0
- package/dist/protocol/command-presets.js.map +1 -0
- package/dist/protocol/key.d.ts +20 -0
- package/dist/protocol/key.d.ts.map +1 -0
- package/dist/protocol/key.js +197 -0
- package/dist/protocol/key.js.map +1 -0
- package/dist/protocol/keyboard-presets.d.ts +6 -0
- package/dist/protocol/keyboard-presets.d.ts.map +1 -0
- package/dist/protocol/keyboard-presets.js +211 -0
- package/dist/protocol/keyboard-presets.js.map +1 -0
- package/dist/protocol/macro.d.ts +23 -0
- package/dist/protocol/macro.d.ts.map +1 -0
- package/dist/protocol/macro.js +144 -0
- package/dist/protocol/macro.js.map +1 -0
- package/dist/protocol/packet.d.ts +88 -0
- package/dist/protocol/packet.d.ts.map +1 -0
- package/dist/protocol/packet.js +294 -0
- package/dist/protocol/packet.js.map +1 -0
- package/dist/types.d.ts +127 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/webhid.d.ts +51 -0
- package/dist/webhid.d.ts.map +1 -0
- package/dist/webhid.js +2 -0
- package/dist/webhid.js.map +1 -0
- package/package.json +38 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/** 键盘按键预设(原厂 AJ159 V2 SE 驱动 keys.json,type=0x10) */
|
|
2
|
+
export const KEYBOARD_PRESETS = [
|
|
3
|
+
{ id: 'kb-minus', label: '-', type: 0x10, code1: 0x0, code2: 0x2d, code3: 0 },
|
|
4
|
+
{ id: 'kb-comma', label: ',', type: 0x10, code1: 0x0, code2: 0x36, code3: 0 },
|
|
5
|
+
{ id: 'kb-semicolon', label: ';', type: 0x10, code1: 0x0, code2: 0x33, code3: 0 },
|
|
6
|
+
{ id: 'kb-period', label: '.', type: 0x10, code1: 0x0, code2: 0x37, code3: 0 },
|
|
7
|
+
{ id: 'kb-quote', label: '\'', type: 0x10, code1: 0x0, code2: 0x34, code3: 0 },
|
|
8
|
+
{ id: 'kb-bracket-left', label: '[', type: 0x10, code1: 0x0, code2: 0x2f, code3: 0 },
|
|
9
|
+
{ id: 'kb-bracket-right', label: ']', type: 0x10, code1: 0x0, code2: 0x30, code3: 0 },
|
|
10
|
+
{ id: 'kb-backslash', label: '\\', type: 0x10, code1: 0x0, code2: 0x31, code3: 0 },
|
|
11
|
+
{ id: 'kb-slash', label: '/', type: 0x10, code1: 0x0, code2: 0x38, code3: 0 },
|
|
12
|
+
{ id: 'kb-backtick', label: '`', type: 0x10, code1: 0x0, code2: 0x35, code3: 0 },
|
|
13
|
+
{ id: 'kb-equal', label: '=', type: 0x10, code1: 0x0, code2: 0x2e, code3: 0 },
|
|
14
|
+
{ id: 'kb-0', label: '0', type: 0x10, code1: 0x0, code2: 0x27, code3: 0 },
|
|
15
|
+
{ id: 'kb-1', label: '1', type: 0x10, code1: 0x0, code2: 0x1e, code3: 0 },
|
|
16
|
+
{ id: 'kb-2', label: '2', type: 0x10, code1: 0x0, code2: 0x1f, code3: 0 },
|
|
17
|
+
{ id: 'kb-3', label: '3', type: 0x10, code1: 0x0, code2: 0x20, code3: 0 },
|
|
18
|
+
{ id: 'kb-4', label: '4', type: 0x10, code1: 0x0, code2: 0x21, code3: 0 },
|
|
19
|
+
{ id: 'kb-5', label: '5', type: 0x10, code1: 0x0, code2: 0x22, code3: 0 },
|
|
20
|
+
{ id: 'kb-6', label: '6', type: 0x10, code1: 0x0, code2: 0x23, code3: 0 },
|
|
21
|
+
{ id: 'kb-7', label: '7', type: 0x10, code1: 0x0, code2: 0x24, code3: 0 },
|
|
22
|
+
{ id: 'kb-8', label: '8', type: 0x10, code1: 0x0, code2: 0x25, code3: 0 },
|
|
23
|
+
{ id: 'kb-9', label: '9', type: 0x10, code1: 0x0, code2: 0x26, code3: 0 },
|
|
24
|
+
{ id: 'kb-a', label: 'A', type: 0x10, code1: 0x0, code2: 0x4, code3: 0 },
|
|
25
|
+
{ id: 'kb-b', label: 'B', type: 0x10, code1: 0x0, code2: 0x5, code3: 0 },
|
|
26
|
+
{ id: 'kb-c', label: 'C', type: 0x10, code1: 0x0, code2: 0x6, code3: 0 },
|
|
27
|
+
{ id: 'kb-d', label: 'D', type: 0x10, code1: 0x0, code2: 0x7, code3: 0 },
|
|
28
|
+
{ id: 'kb-e', label: 'E', type: 0x10, code1: 0x0, code2: 0x8, code3: 0 },
|
|
29
|
+
{ id: 'kb-f', label: 'F', type: 0x10, code1: 0x0, code2: 0x9, code3: 0 },
|
|
30
|
+
{ id: 'kb-g', label: 'G', type: 0x10, code1: 0x0, code2: 0xa, code3: 0 },
|
|
31
|
+
{ id: 'kb-h', label: 'H', type: 0x10, code1: 0x0, code2: 0xb, code3: 0 },
|
|
32
|
+
{ id: 'kb-i', label: 'I', type: 0x10, code1: 0x0, code2: 0xc, code3: 0 },
|
|
33
|
+
{ id: 'kb-j', label: 'J', type: 0x10, code1: 0x0, code2: 0xd, code3: 0 },
|
|
34
|
+
{ id: 'kb-k', label: 'K', type: 0x10, code1: 0x0, code2: 0xe, code3: 0 },
|
|
35
|
+
{ id: 'kb-l', label: 'L', type: 0x10, code1: 0x0, code2: 0xf, code3: 0 },
|
|
36
|
+
{ id: 'kb-m', label: 'M', type: 0x10, code1: 0x0, code2: 0x10, code3: 0 },
|
|
37
|
+
{ id: 'kb-n', label: 'N', type: 0x10, code1: 0x0, code2: 0x11, code3: 0 },
|
|
38
|
+
{ id: 'kb-o', label: 'O', type: 0x10, code1: 0x0, code2: 0x12, code3: 0 },
|
|
39
|
+
{ id: 'kb-p', label: 'P', type: 0x10, code1: 0x0, code2: 0x13, code3: 0 },
|
|
40
|
+
{ id: 'kb-q', label: 'Q', type: 0x10, code1: 0x0, code2: 0x14, code3: 0 },
|
|
41
|
+
{ id: 'kb-r', label: 'R', type: 0x10, code1: 0x0, code2: 0x15, code3: 0 },
|
|
42
|
+
{ id: 'kb-s', label: 'S', type: 0x10, code1: 0x0, code2: 0x16, code3: 0 },
|
|
43
|
+
{ id: 'kb-t', label: 'T', type: 0x10, code1: 0x0, code2: 0x17, code3: 0 },
|
|
44
|
+
{ id: 'kb-u', label: 'U', type: 0x10, code1: 0x0, code2: 0x18, code3: 0 },
|
|
45
|
+
{ id: 'kb-v', label: 'V', type: 0x10, code1: 0x0, code2: 0x19, code3: 0 },
|
|
46
|
+
{ id: 'kb-w', label: 'W', type: 0x10, code1: 0x0, code2: 0x1a, code3: 0 },
|
|
47
|
+
{ id: 'kb-x', label: 'X', type: 0x10, code1: 0x0, code2: 0x1b, code3: 0 },
|
|
48
|
+
{ id: 'kb-y', label: 'Y', type: 0x10, code1: 0x0, code2: 0x1c, code3: 0 },
|
|
49
|
+
{ id: 'kb-z', label: 'Z', type: 0x10, code1: 0x0, code2: 0x1d, code3: 0 },
|
|
50
|
+
{ id: 'kb-backspace', label: 'Backspace', type: 0x10, code1: 0x0, code2: 0x2a, code3: 0 },
|
|
51
|
+
{ id: 'kb-caps-lock', label: 'Caps Lock', type: 0x10, code1: 0x0, code2: 0x39, code3: 0 },
|
|
52
|
+
{ id: 'kb-delete', label: 'Delete', type: 0x10, code1: 0x0, code2: 0x4c, code3: 0 },
|
|
53
|
+
{ id: 'kb-down', label: 'Down', type: 0x10, code1: 0x0, code2: 0x51, code3: 0 },
|
|
54
|
+
{ id: 'kb-end', label: 'End', type: 0x10, code1: 0x0, code2: 0x4d, code3: 0 },
|
|
55
|
+
{ id: 'kb-enter', label: 'Enter', type: 0x10, code1: 0x0, code2: 0x28, code3: 0 },
|
|
56
|
+
{ id: 'kb-esc', label: 'Esc', type: 0x10, code1: 0x0, code2: 0x29, code3: 0 },
|
|
57
|
+
{ id: 'kb-f1', label: 'F1', type: 0x10, code1: 0x0, code2: 0x3a, code3: 0 },
|
|
58
|
+
{ id: 'kb-f2', label: 'F2', type: 0x10, code1: 0x0, code2: 0x3b, code3: 0 },
|
|
59
|
+
{ id: 'kb-f3', label: 'F3', type: 0x10, code1: 0x0, code2: 0x3c, code3: 0 },
|
|
60
|
+
{ id: 'kb-f4', label: 'F4', type: 0x10, code1: 0x0, code2: 0x3d, code3: 0 },
|
|
61
|
+
{ id: 'kb-f5', label: 'F5', type: 0x10, code1: 0x0, code2: 0x3e, code3: 0 },
|
|
62
|
+
{ id: 'kb-f6', label: 'F6', type: 0x10, code1: 0x0, code2: 0x3f, code3: 0 },
|
|
63
|
+
{ id: 'kb-f7', label: 'F7', type: 0x10, code1: 0x0, code2: 0x40, code3: 0 },
|
|
64
|
+
{ id: 'kb-f8', label: 'F8', type: 0x10, code1: 0x0, code2: 0x41, code3: 0 },
|
|
65
|
+
{ id: 'kb-f9', label: 'F9', type: 0x10, code1: 0x0, code2: 0x42, code3: 0 },
|
|
66
|
+
{ id: 'kb-f10', label: 'F10', type: 0x10, code1: 0x0, code2: 0x43, code3: 0 },
|
|
67
|
+
{ id: 'kb-f11', label: 'F11', type: 0x10, code1: 0x0, code2: 0x44, code3: 0 },
|
|
68
|
+
{ id: 'kb-f12', label: 'F12', type: 0x10, code1: 0x0, code2: 0x45, code3: 0 },
|
|
69
|
+
{ id: 'kb-home', label: 'Home', type: 0x10, code1: 0x0, code2: 0x4a, code3: 0 },
|
|
70
|
+
{ id: 'kb-insert', label: 'Insert', type: 0x10, code1: 0x0, code2: 0x49, code3: 0 },
|
|
71
|
+
{ id: 'kb-left', label: 'Left', type: 0x10, code1: 0x0, code2: 0x50, code3: 0 },
|
|
72
|
+
{ id: 'kb-num', label: 'Num -', type: 0x10, code1: 0x0, code2: 0x56, code3: 0 },
|
|
73
|
+
{ id: 'kb-num-star', label: 'Num *', type: 0x10, code1: 0x0, code2: 0x55, code3: 0 },
|
|
74
|
+
{ id: 'kb-num-slash', label: 'Num /', type: 0x10, code1: 0x0, code2: 0x54, code3: 0 },
|
|
75
|
+
{ id: 'kb-num-plus', label: 'Num +', type: 0x10, code1: 0x0, code2: 0x57, code3: 0 },
|
|
76
|
+
{ id: 'kb-num-0', label: 'Num 0', type: 0x10, code1: 0x0, code2: 0x62, code3: 0 },
|
|
77
|
+
{ id: 'kb-num-1', label: 'Num 1', type: 0x10, code1: 0x0, code2: 0x59, code3: 0 },
|
|
78
|
+
{ id: 'kb-num-2', label: 'Num 2', type: 0x10, code1: 0x0, code2: 0x5a, code3: 0 },
|
|
79
|
+
{ id: 'kb-num-3', label: 'Num 3', type: 0x10, code1: 0x0, code2: 0x5b, code3: 0 },
|
|
80
|
+
{ id: 'kb-num-4', label: 'Num 4', type: 0x10, code1: 0x0, code2: 0x5c, code3: 0 },
|
|
81
|
+
{ id: 'kb-num-5', label: 'Num 5', type: 0x10, code1: 0x0, code2: 0x5d, code3: 0 },
|
|
82
|
+
{ id: 'kb-num-6', label: 'Num 6', type: 0x10, code1: 0x0, code2: 0x5e, code3: 0 },
|
|
83
|
+
{ id: 'kb-num-7', label: 'Num 7', type: 0x10, code1: 0x0, code2: 0x5f, code3: 0 },
|
|
84
|
+
{ id: 'kb-num-8', label: 'Num 8', type: 0x10, code1: 0x0, code2: 0x60, code3: 0 },
|
|
85
|
+
{ id: 'kb-num-9', label: 'Num 9', type: 0x10, code1: 0x0, code2: 0x61, code3: 0 },
|
|
86
|
+
{ id: 'kb-num-del', label: 'Num Del', type: 0x10, code1: 0x0, code2: 0x63, code3: 0 },
|
|
87
|
+
{ id: 'kb-num-enter', label: 'Num Enter', type: 0x10, code1: 0x0, code2: 0x58, code3: 0 },
|
|
88
|
+
{ id: 'kb-num-lock', label: 'Num Lock', type: 0x10, code1: 0x0, code2: 0x53, code3: 0 },
|
|
89
|
+
{ id: 'kb-page-down', label: 'Page Down', type: 0x10, code1: 0x0, code2: 0x4e, code3: 0 },
|
|
90
|
+
{ id: 'kb-page-up', label: 'Page Up', type: 0x10, code1: 0x0, code2: 0x4b, code3: 0 },
|
|
91
|
+
{ id: 'kb-pause', label: 'Pause', type: 0x10, code1: 0x0, code2: 0x48, code3: 0 },
|
|
92
|
+
{ id: 'kb-right', label: 'Right', type: 0x10, code1: 0x0, code2: 0x4f, code3: 0 },
|
|
93
|
+
{ id: 'kb-left-windows', label: 'Left Windows', type: 0x10, code1: 0x0, code2: 0xe3, code3: 0 },
|
|
94
|
+
{ id: 'kb-right-windows', label: 'Right Windows', type: 0x10, code1: 0x0, code2: 0xe7, code3: 0 },
|
|
95
|
+
{ id: 'kb-left-alt', label: 'Left Alt', type: 0x10, code1: 0x0, code2: 0xe2, code3: 0 },
|
|
96
|
+
{ id: 'kb-right-alt', label: 'Right Alt', type: 0x10, code1: 0x0, code2: 0xe6, code3: 0 },
|
|
97
|
+
{ id: 'kb-left-ctrl', label: 'Left Ctrl', type: 0x10, code1: 0x0, code2: 0xe0, code3: 0 },
|
|
98
|
+
{ id: 'kb-right-ctrl', label: 'Right Ctrl', type: 0x10, code1: 0x0, code2: 0xe4, code3: 0 },
|
|
99
|
+
{ id: 'kb-left-shift', label: 'Left Shift', type: 0x10, code1: 0x0, code2: 0xe1, code3: 0 },
|
|
100
|
+
{ id: 'kb-right-shift', label: 'Right Shift', type: 0x10, code1: 0x0, code2: 0xe5, code3: 0 },
|
|
101
|
+
{ id: 'kb-scroll-lock', label: 'Scroll Lock', type: 0x10, code1: 0x0, code2: 0x47, code3: 0 },
|
|
102
|
+
{ id: 'kb-space', label: 'Space', type: 0x10, code1: 0x0, code2: 0x2c, code3: 0 },
|
|
103
|
+
{ id: 'kb-tab', label: 'Tab', type: 0x10, code1: 0x0, code2: 0x2b, code3: 0 },
|
|
104
|
+
{ id: 'kb-up', label: 'Up', type: 0x10, code1: 0x0, code2: 0x52, code3: 0 },
|
|
105
|
+
];
|
|
106
|
+
/** 原厂驱动「键盘」分组顺序 */
|
|
107
|
+
export const KEYBOARD_PRESET_IDS = [
|
|
108
|
+
'kb-minus',
|
|
109
|
+
'kb-comma',
|
|
110
|
+
'kb-semicolon',
|
|
111
|
+
'kb-period',
|
|
112
|
+
'kb-quote',
|
|
113
|
+
'kb-bracket-left',
|
|
114
|
+
'kb-bracket-right',
|
|
115
|
+
'kb-backslash',
|
|
116
|
+
'kb-slash',
|
|
117
|
+
'kb-backtick',
|
|
118
|
+
'kb-equal',
|
|
119
|
+
'kb-0',
|
|
120
|
+
'kb-1',
|
|
121
|
+
'kb-2',
|
|
122
|
+
'kb-3',
|
|
123
|
+
'kb-4',
|
|
124
|
+
'kb-5',
|
|
125
|
+
'kb-6',
|
|
126
|
+
'kb-7',
|
|
127
|
+
'kb-8',
|
|
128
|
+
'kb-9',
|
|
129
|
+
'kb-a',
|
|
130
|
+
'kb-b',
|
|
131
|
+
'kb-c',
|
|
132
|
+
'kb-d',
|
|
133
|
+
'kb-e',
|
|
134
|
+
'kb-f',
|
|
135
|
+
'kb-g',
|
|
136
|
+
'kb-h',
|
|
137
|
+
'kb-i',
|
|
138
|
+
'kb-j',
|
|
139
|
+
'kb-k',
|
|
140
|
+
'kb-l',
|
|
141
|
+
'kb-m',
|
|
142
|
+
'kb-n',
|
|
143
|
+
'kb-o',
|
|
144
|
+
'kb-p',
|
|
145
|
+
'kb-q',
|
|
146
|
+
'kb-r',
|
|
147
|
+
'kb-s',
|
|
148
|
+
'kb-t',
|
|
149
|
+
'kb-u',
|
|
150
|
+
'kb-v',
|
|
151
|
+
'kb-w',
|
|
152
|
+
'kb-x',
|
|
153
|
+
'kb-y',
|
|
154
|
+
'kb-z',
|
|
155
|
+
'kb-backspace',
|
|
156
|
+
'kb-caps-lock',
|
|
157
|
+
'kb-delete',
|
|
158
|
+
'kb-down',
|
|
159
|
+
'kb-end',
|
|
160
|
+
'kb-enter',
|
|
161
|
+
'kb-esc',
|
|
162
|
+
'kb-f1',
|
|
163
|
+
'kb-f2',
|
|
164
|
+
'kb-f3',
|
|
165
|
+
'kb-f4',
|
|
166
|
+
'kb-f5',
|
|
167
|
+
'kb-f6',
|
|
168
|
+
'kb-f7',
|
|
169
|
+
'kb-f8',
|
|
170
|
+
'kb-f9',
|
|
171
|
+
'kb-f10',
|
|
172
|
+
'kb-f11',
|
|
173
|
+
'kb-f12',
|
|
174
|
+
'kb-home',
|
|
175
|
+
'kb-insert',
|
|
176
|
+
'kb-left',
|
|
177
|
+
'kb-num',
|
|
178
|
+
'kb-num-star',
|
|
179
|
+
'kb-num-slash',
|
|
180
|
+
'kb-num-plus',
|
|
181
|
+
'kb-num-0',
|
|
182
|
+
'kb-num-1',
|
|
183
|
+
'kb-num-2',
|
|
184
|
+
'kb-num-3',
|
|
185
|
+
'kb-num-4',
|
|
186
|
+
'kb-num-5',
|
|
187
|
+
'kb-num-6',
|
|
188
|
+
'kb-num-7',
|
|
189
|
+
'kb-num-8',
|
|
190
|
+
'kb-num-9',
|
|
191
|
+
'kb-num-del',
|
|
192
|
+
'kb-num-enter',
|
|
193
|
+
'kb-num-lock',
|
|
194
|
+
'kb-page-down',
|
|
195
|
+
'kb-page-up',
|
|
196
|
+
'kb-pause',
|
|
197
|
+
'kb-right',
|
|
198
|
+
'kb-left-windows',
|
|
199
|
+
'kb-right-windows',
|
|
200
|
+
'kb-left-alt',
|
|
201
|
+
'kb-right-alt',
|
|
202
|
+
'kb-left-ctrl',
|
|
203
|
+
'kb-right-ctrl',
|
|
204
|
+
'kb-left-shift',
|
|
205
|
+
'kb-right-shift',
|
|
206
|
+
'kb-scroll-lock',
|
|
207
|
+
'kb-space',
|
|
208
|
+
'kb-tab',
|
|
209
|
+
'kb-up',
|
|
210
|
+
];
|
|
211
|
+
//# sourceMappingURL=keyboard-presets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboard-presets.js","sourceRoot":"","sources":["../../src/protocol/keyboard-presets.ts"],"names":[],"mappings":"AAEA,oDAAoD;AACpD,MAAM,CAAC,MAAM,gBAAgB,GAAgB;IAC3C,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;IAC7E,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;IAC7E,EAAE,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE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ACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,cAAc;IACd,cAAc;IACd,WAAW;IACX,SAAS;IACT,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,WAAW;IACX,SAAS;IACT,QAAQ;IACR,aAAa;IACb,cAAc;IACd,aAAa;IACb,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,YAAY;IACZ,cAAc;IACd,aAAa;IACb,cAAc;IACd,YAAY;IACZ,UAAU;IACV,UAAU;IACV,iBAAiB;IACjB,kBAAkB;IAClB,aAAa;IACb,cAAc;IACd,cAAc;IACd,eAAe;IACf,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,UAAU;IACV,QAAQ;IACR,OAAO;CACR,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { MacroAction, MacroButtonOptions, MacroProfileIndex, MouseKeyMapping, MouseMacro } from '../types.js';
|
|
2
|
+
export declare const MAX_MACROS = 32;
|
|
3
|
+
export declare const MACRO_POINTER_AREA_SIZE: number;
|
|
4
|
+
export declare const MACRO_HEADER_SIZE: number;
|
|
5
|
+
export declare const MACRO_CHUNK_SIZE = 56;
|
|
6
|
+
export declare const MACRO_PROFILE_SIZE = 2048;
|
|
7
|
+
export declare const MACRO_TOTAL_SIZE: number;
|
|
8
|
+
/** 将宏动作编码为设备协议使用的 4 字节记录。 */
|
|
9
|
+
export declare function encodeMacroActions(actions: MacroAction[]): Uint8Array;
|
|
10
|
+
/**
|
|
11
|
+
* 构建单个 2K profile 的有效数据:64 字节指针区、4 字节固定头和动作数据。
|
|
12
|
+
* macros 的数组位置就是宏索引;空宏的指针使用 0x0040。
|
|
13
|
+
*/
|
|
14
|
+
export declare function buildMacroData(macros: readonly MouseMacro[]): Uint8Array;
|
|
15
|
+
/** 将宏数据拆分为命令 0x0D 使用的 56 字节分片。 */
|
|
16
|
+
export declare function buildMacroWritePackets(macros: readonly MouseMacro[], profileIndex?: MacroProfileIndex): Uint8Array[];
|
|
17
|
+
/** 创建宏写入完成后的提交命令。 */
|
|
18
|
+
export declare function createMacroCommitPacket(): Uint8Array;
|
|
19
|
+
/** 清空设备宏数据(原厂 resetMacroData: [6, 15, 4])。 */
|
|
20
|
+
export declare function createMacroResetPacket(): Uint8Array;
|
|
21
|
+
/** 将宏分配选项转换为 type=0x70 的按键映射。 */
|
|
22
|
+
export declare function macroAssignmentToKey(index: number, options: MacroButtonOptions): MouseKeyMapping;
|
|
23
|
+
//# sourceMappingURL=macro.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"macro.d.ts","sourceRoot":"","sources":["../../src/protocol/macro.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,UAAU,EACX,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,UAAU,KAAK,CAAC;AAC7B,eAAO,MAAM,uBAAuB,QAAiB,CAAC;AACtD,eAAO,MAAM,iBAAiB,QAA8B,CAAC;AAC7D,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,kBAAkB,OAAO,CAAC;AACvC,eAAO,MAAM,gBAAgB,QAAyB,CAAC;AA6DvD,6BAA6B;AAC7B,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,UAAU,CAMrE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG,UAAU,CA+BxE;AAED,kCAAkC;AAClC,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,UAAU,EAAE,EAC7B,YAAY,GAAE,iBAAqB,GAClC,UAAU,EAAE,CAyBd;AAED,qBAAqB;AACrB,wBAAgB,uBAAuB,IAAI,UAAU,CAEpD;AAED,8CAA8C;AAC9C,wBAAgB,sBAAsB,IAAI,UAAU,CAEnD;AAED,iCAAiC;AACjC,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,kBAAkB,GAC1B,eAAe,CAajB"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { Command, PACKET_SIZE } from '../constants.js';
|
|
2
|
+
import { createPacket } from './packet.js';
|
|
3
|
+
export const MAX_MACROS = 32;
|
|
4
|
+
export const MACRO_POINTER_AREA_SIZE = MAX_MACROS * 2;
|
|
5
|
+
export const MACRO_HEADER_SIZE = MACRO_POINTER_AREA_SIZE + 4;
|
|
6
|
+
export const MACRO_CHUNK_SIZE = 56;
|
|
7
|
+
export const MACRO_PROFILE_SIZE = 2048;
|
|
8
|
+
export const MACRO_TOTAL_SIZE = MACRO_PROFILE_SIZE * 2;
|
|
9
|
+
const EMPTY_MACRO_POINTER = MACRO_POINTER_AREA_SIZE;
|
|
10
|
+
const MACRO_FIXED_HEADER = [0x00, 0x00, 0x80, 0x00];
|
|
11
|
+
const MOUSE_BUTTON_CODE = {
|
|
12
|
+
left: 0x01,
|
|
13
|
+
middle: 0x04,
|
|
14
|
+
right: 0x02,
|
|
15
|
+
back: 0x08,
|
|
16
|
+
forward: 0x10,
|
|
17
|
+
};
|
|
18
|
+
function assertIntegerInRange(name, value, min, max) {
|
|
19
|
+
if (!Number.isInteger(value) || value < min || value > max) {
|
|
20
|
+
throw new RangeError(`${name} 必须是 ${min}..${max} 之间的整数,收到 ${value}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function writeU16LE(target, offset, value) {
|
|
24
|
+
target[offset] = value & 0xff;
|
|
25
|
+
target[offset + 1] = (value >> 8) & 0xff;
|
|
26
|
+
}
|
|
27
|
+
function normalizeDelay(delay) {
|
|
28
|
+
if (delay === undefined || delay === 0) {
|
|
29
|
+
return 2;
|
|
30
|
+
}
|
|
31
|
+
assertIntegerInRange('宏动作 delay', delay, 1, 0xffff);
|
|
32
|
+
return delay;
|
|
33
|
+
}
|
|
34
|
+
function encodeAction(action, isLast) {
|
|
35
|
+
const delay = normalizeDelay(action.delay);
|
|
36
|
+
let actionType;
|
|
37
|
+
let actionCode;
|
|
38
|
+
let isMake;
|
|
39
|
+
if (action.type === 'mouse') {
|
|
40
|
+
actionType = 3;
|
|
41
|
+
actionCode = MOUSE_BUTTON_CODE[action.button];
|
|
42
|
+
isMake = action.action === 'mousedown';
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
assertIntegerInRange('键盘宏 keyCode', action.keyCode, 0, 0xff);
|
|
46
|
+
isMake = action.action === 'keydown';
|
|
47
|
+
if (action.keyCode >= 0xe0) {
|
|
48
|
+
// E0..E7 是 8 个键盘修饰键,协议以 type=1 和位掩码保存。
|
|
49
|
+
assertIntegerInRange('修饰键 keyCode', action.keyCode, 0xe0, 0xe7);
|
|
50
|
+
actionType = 1;
|
|
51
|
+
actionCode = 1 << (action.keyCode & 0x0f);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
actionType = 2;
|
|
55
|
+
actionCode = action.keyCode;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const flags = actionType | (isMake ? 0x40 : 0) | (isLast ? 0x80 : 0);
|
|
59
|
+
return [delay & 0xff, (delay >> 8) & 0xff, flags, actionCode];
|
|
60
|
+
}
|
|
61
|
+
/** 将宏动作编码为设备协议使用的 4 字节记录。 */
|
|
62
|
+
export function encodeMacroActions(actions) {
|
|
63
|
+
const encoded = new Uint8Array(actions.length * 4);
|
|
64
|
+
actions.forEach((action, index) => {
|
|
65
|
+
encoded.set(encodeAction(action, index === actions.length - 1), index * 4);
|
|
66
|
+
});
|
|
67
|
+
return encoded;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* 构建单个 2K profile 的有效数据:64 字节指针区、4 字节固定头和动作数据。
|
|
71
|
+
* macros 的数组位置就是宏索引;空宏的指针使用 0x0040。
|
|
72
|
+
*/
|
|
73
|
+
export function buildMacroData(macros) {
|
|
74
|
+
if (macros.length > MAX_MACROS) {
|
|
75
|
+
throw new RangeError(`宏数量不能超过 ${MAX_MACROS},收到 ${macros.length}`);
|
|
76
|
+
}
|
|
77
|
+
const encodedMacros = macros.map((macro) => encodeMacroActions(macro.actions));
|
|
78
|
+
const actionDataLength = encodedMacros.reduce((sum, data) => sum + data.length, 0);
|
|
79
|
+
const maxActionDataLength = MACRO_PROFILE_SIZE - MACRO_HEADER_SIZE;
|
|
80
|
+
if (actionDataLength > maxActionDataLength) {
|
|
81
|
+
throw new RangeError(`宏动作数据超过单个 profile 容量:${actionDataLength} > ${maxActionDataLength} 字节`);
|
|
82
|
+
}
|
|
83
|
+
const result = new Uint8Array(MACRO_HEADER_SIZE + actionDataLength);
|
|
84
|
+
let actionOffset = 0;
|
|
85
|
+
encodedMacros.forEach((data, macroIndex) => {
|
|
86
|
+
const pointer = data.length > 0 ? MACRO_HEADER_SIZE + actionOffset : EMPTY_MACRO_POINTER;
|
|
87
|
+
writeU16LE(result, macroIndex * 2, pointer);
|
|
88
|
+
actionOffset += data.length;
|
|
89
|
+
});
|
|
90
|
+
result.set(MACRO_FIXED_HEADER, MACRO_POINTER_AREA_SIZE);
|
|
91
|
+
let cursor = MACRO_HEADER_SIZE;
|
|
92
|
+
for (const data of encodedMacros) {
|
|
93
|
+
result.set(data, cursor);
|
|
94
|
+
cursor += data.length;
|
|
95
|
+
}
|
|
96
|
+
return result;
|
|
97
|
+
}
|
|
98
|
+
/** 将宏数据拆分为命令 0x0D 使用的 56 字节分片。 */
|
|
99
|
+
export function buildMacroWritePackets(macros, profileIndex = 0) {
|
|
100
|
+
assertIntegerInRange('profileIndex', profileIndex, 0, 1);
|
|
101
|
+
const data = buildMacroData(macros);
|
|
102
|
+
const packets = [];
|
|
103
|
+
for (let offset = 0; offset < data.length; offset += MACRO_CHUNK_SIZE) {
|
|
104
|
+
const chunk = data.subarray(offset, Math.min(offset + MACRO_CHUNK_SIZE, data.length));
|
|
105
|
+
const address = profileIndex * MACRO_PROFILE_SIZE + offset;
|
|
106
|
+
const body = [
|
|
107
|
+
chunk.length,
|
|
108
|
+
address & 0xff,
|
|
109
|
+
(address >> 8) & 0xff,
|
|
110
|
+
0x00,
|
|
111
|
+
...chunk,
|
|
112
|
+
];
|
|
113
|
+
const checksum = body.reduce((sum, byte) => sum + byte, 0) & 0xff;
|
|
114
|
+
const packet = createPacket(Command.WriteMacro, [0x00, checksum, ...body]);
|
|
115
|
+
if (packet.length !== PACKET_SIZE) {
|
|
116
|
+
throw new Error(`宏写入包长度异常:${packet.length}`);
|
|
117
|
+
}
|
|
118
|
+
packets.push(packet);
|
|
119
|
+
}
|
|
120
|
+
return packets;
|
|
121
|
+
}
|
|
122
|
+
/** 创建宏写入完成后的提交命令。 */
|
|
123
|
+
export function createMacroCommitPacket() {
|
|
124
|
+
return createPacket(Command.CommitMacro, [0xa5, 0x22, 0x00, 0x00, 0x00, 0x05]);
|
|
125
|
+
}
|
|
126
|
+
/** 清空设备宏数据(原厂 resetMacroData: [6, 15, 4])。 */
|
|
127
|
+
export function createMacroResetPacket() {
|
|
128
|
+
return createPacket(0x06, [0x0f, 0x04]);
|
|
129
|
+
}
|
|
130
|
+
/** 将宏分配选项转换为 type=0x70 的按键映射。 */
|
|
131
|
+
export function macroAssignmentToKey(index, options) {
|
|
132
|
+
assertIntegerInRange('按键 index', index, 0, 5);
|
|
133
|
+
assertIntegerInRange('macroIndex', options.macroIndex, 0, MAX_MACROS - 1);
|
|
134
|
+
const repeat = options.repeat ?? 1;
|
|
135
|
+
assertIntegerInRange('repeat', repeat, 1, 0xff);
|
|
136
|
+
return {
|
|
137
|
+
index,
|
|
138
|
+
type: 0x70,
|
|
139
|
+
code1: options.macroIndex,
|
|
140
|
+
code2: repeat,
|
|
141
|
+
code3: options.triggerMode ?? 0,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=macro.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"macro.js","sourceRoot":"","sources":["../../src/protocol/macro.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAS3C,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAC;AAC7B,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,GAAG,CAAC,CAAC;AACtD,MAAM,CAAC,MAAM,iBAAiB,GAAG,uBAAuB,GAAG,CAAC,CAAC;AAC7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC;AACvC,MAAM,CAAC,MAAM,gBAAgB,GAAG,kBAAkB,GAAG,CAAC,CAAC;AAEvD,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AACpD,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;AAE7D,MAAM,iBAAiB,GAAG;IACxB,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,IAAI;CACL,CAAC;AAEX,SAAS,oBAAoB,CAAC,IAAY,EAAE,KAAa,EAAE,GAAW,EAAE,GAAW;IACjF,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,GAAG,IAAI,KAAK,GAAG,GAAG,EAAE,CAAC;QAC3D,MA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AAC,OAAO,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AACjF,CAAC;AAED,8CAA8C;AAC9C,MAAM,UAAU,sBAAsB;IACpC,OAAO,YAAY,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAC1C,CAAC;AAED,iCAAiC;AACjC,MAAM,UAAU,oBAAoB,CAClC,KAAa,EACb,OAA2B;IAE3B,oBAAoB,CAAC,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9C,oBAAoB,CAAC,YAAY,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,CAAC,CAAC,CAAC;IAC1E,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC;IACnC,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;IAEhD,OAAO;QACL,KAAK;QACL,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,OAAO,CAAC,UAAU;QACzB,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,OAAO,CAAC,WAAW,IAAI,CAAC;KAChC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { PerformanceSettings } from '../types.js';
|
|
2
|
+
export declare function createPacket(command: number, payload?: number[]): Uint8Array;
|
|
3
|
+
export declare function getReportId(packet: Uint8Array): number;
|
|
4
|
+
export declare function getPayload(packet: Uint8Array): Uint8Array;
|
|
5
|
+
export declare function createHandshakePacket(): Uint8Array;
|
|
6
|
+
export declare function createPingPacket(): Uint8Array;
|
|
7
|
+
/**
|
|
8
|
+
* 解析 Ping(0x04) 上报中的固件版本。
|
|
9
|
+
* 原厂:r(o.slice(2)).slice(-5).join(''),r() 单参数时仅保留可打印字符。
|
|
10
|
+
*/
|
|
11
|
+
export declare function parsePingVersionReport(data: Uint8Array): string | null;
|
|
12
|
+
export declare function createReadPacket(address: number, offset: number, command?: number): Uint8Array;
|
|
13
|
+
export declare function createWritePacket(address: number, offset: number, payload: number[]): Uint8Array;
|
|
14
|
+
export declare function readDeviceInfoPacket(): Uint8Array;
|
|
15
|
+
export declare function readConfigPacket(): Uint8Array;
|
|
16
|
+
export declare function readProfilePacket(): Uint8Array;
|
|
17
|
+
/** @deprecated */
|
|
18
|
+
export declare const readProfileRetryPacket: typeof readProfilePacket;
|
|
19
|
+
export declare function writeProfilePacket(payload: number[]): Uint8Array;
|
|
20
|
+
export declare function isValidResponse(reportId: number, data: Uint8Array): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 统一 Web HID 输入报告格式。
|
|
23
|
+
* Bus Hound 可见 `F0 0F AE ...` 共 64 字节;浏览器里 reportId 可能与首字节分离或合并。
|
|
24
|
+
*/
|
|
25
|
+
export declare function normalizeInputReport(_reportId: number, data: Uint8Array): Uint8Array;
|
|
26
|
+
export declare function getResponseCommand(data: Uint8Array): number;
|
|
27
|
+
/**
|
|
28
|
+
* 解析 0xFA 状态上报(原厂 statu 回调)
|
|
29
|
+
* 抓包:F0 FA 00 23 0A 00 00 00 10 05 04 → 档位 byte[9]=5,回报率 byte[10]=4
|
|
30
|
+
*/
|
|
31
|
+
export declare function parseStatusReport(data: Uint8Array): {
|
|
32
|
+
dpiIndex: number;
|
|
33
|
+
pollRateIndex: number;
|
|
34
|
+
} | null;
|
|
35
|
+
export declare function toHex(data: Uint8Array | ArrayLike<number>, max?: number): string;
|
|
36
|
+
export declare function validateDpiValue(value: number): number;
|
|
37
|
+
/** 原厂 getMouseConfigInfo / setMouseConfigData 完整配置 */
|
|
38
|
+
export interface MouseConfigData {
|
|
39
|
+
lightMode: number;
|
|
40
|
+
pollRateIndex: number;
|
|
41
|
+
dpiCount: number;
|
|
42
|
+
currentIndex: number;
|
|
43
|
+
dpiLevels: number[];
|
|
44
|
+
scrollFlag: number;
|
|
45
|
+
lodValue: number;
|
|
46
|
+
sensorFlag: number;
|
|
47
|
+
keyRespond: number;
|
|
48
|
+
sleepLight: number;
|
|
49
|
+
highspeedMode: number;
|
|
50
|
+
statusFlags: number;
|
|
51
|
+
}
|
|
52
|
+
export declare function createFactoryDefaultMouseConfig(): MouseConfigData;
|
|
53
|
+
export declare function parseMouseConfig(data: Uint8Array): MouseConfigData;
|
|
54
|
+
/** 构建 0x0F 写配置 payload(对齐原厂 setMouseConfigData,从 packet[8] 起) */
|
|
55
|
+
export declare function buildMouseConfigWritePayload(config: MouseConfigData): number[];
|
|
56
|
+
export declare function mouseConfigToDpiProfile(config: MouseConfigData): {
|
|
57
|
+
pollRateIndex: number;
|
|
58
|
+
slotCount: number;
|
|
59
|
+
currentIndex: number;
|
|
60
|
+
dpiLevels: number[];
|
|
61
|
+
};
|
|
62
|
+
export declare function mouseConfigToPerformanceSettings(config: MouseConfigData): PerformanceSettings;
|
|
63
|
+
export declare function applyPerformanceSettingsToMouseConfig(base: MouseConfigData, settings: PerformanceSettings): MouseConfigData;
|
|
64
|
+
export declare function dpiProfileToMouseConfig(profile: {
|
|
65
|
+
currentIndex: number;
|
|
66
|
+
pollRate: number;
|
|
67
|
+
levels: number[];
|
|
68
|
+
}, base?: MouseConfigData): MouseConfigData;
|
|
69
|
+
export declare function parseConfigResponse(data: Uint8Array): {
|
|
70
|
+
pollRateIndex: number;
|
|
71
|
+
slotCount: number;
|
|
72
|
+
currentIndex: number;
|
|
73
|
+
dpiLevels: number[];
|
|
74
|
+
};
|
|
75
|
+
export declare function buildProfilePayload(options: {
|
|
76
|
+
pollRateIndex: number;
|
|
77
|
+
currentIndex: number;
|
|
78
|
+
dpiLevels: number[];
|
|
79
|
+
}): number[];
|
|
80
|
+
/** @deprecated 使用 parseConfigResponse */
|
|
81
|
+
export declare function parseProfilePayload(data: Uint8Array): {
|
|
82
|
+
pollRateCode: number;
|
|
83
|
+
slotCount: number;
|
|
84
|
+
currentIndex: number;
|
|
85
|
+
dpiLevels: number[];
|
|
86
|
+
};
|
|
87
|
+
export declare function toPayloadBuffer(packet: Uint8Array): ArrayBuffer;
|
|
88
|
+
//# sourceMappingURL=packet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packet.d.ts","sourceRoot":"","sources":["../../src/protocol/packet.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,MAAM,EAAO,GAAG,UAAU,CAMhF;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAEtD;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAEzD;AAED,wBAAgB,qBAAqB,IAAI,UAAU,CAElD;AAED,wBAAgB,gBAAgB,IAAI,UAAU,CAE7C;AAoBD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAWtE;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,MAA0B,GAClC,UAAU,CAOZ;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EAAE,GAChB,UAAU,CAQZ;AAED,wBAAgB,oBAAoB,IAAI,UAAU,CAEjD;AAED,wBAAgB,gBAAgB,IAAI,UAAU,CAE7C;AAED,wBAAgB,iBAAiB,IAAI,UAAU,CAE9C;AAED,kBAAkB;AAClB,eAAO,MAAM,sBAAsB,0BAAoB,CAAC;AAExD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,UAAU,CAEhE;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GA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