@openmouse/protocol 0.42.3 → 0.43.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/dist/drivers/registry.d.ts +13 -1
- package/dist/drivers/registry.d.ts.map +1 -1
- package/dist/drivers/registry.js +24 -0
- package/dist/drivers/registry.js.map +1 -1
- package/dist/drivers/steelseries/aerox-3-wireless-gen2-hid.d.ts +65 -0
- package/dist/drivers/steelseries/aerox-3-wireless-gen2-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/aerox-3-wireless-gen2-hid.js +205 -0
- package/dist/drivers/steelseries/aerox-3-wireless-gen2-hid.js.map +1 -0
- package/dist/drivers/steelseries/prime-mini-hid.d.ts +59 -0
- package/dist/drivers/steelseries/prime-mini-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/prime-mini-hid.js +183 -0
- package/dist/drivers/steelseries/prime-mini-hid.js.map +1 -0
- package/dist/drivers/steelseries/rival-100-hid.d.ts +57 -0
- package/dist/drivers/steelseries/rival-100-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/rival-100-hid.js +181 -0
- package/dist/drivers/steelseries/rival-100-hid.js.map +1 -0
- package/dist/drivers/steelseries/rival-110-hid.d.ts +78 -0
- package/dist/drivers/steelseries/rival-110-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/rival-110-hid.js +206 -0
- package/dist/drivers/steelseries/rival-110-hid.js.map +1 -0
- package/dist/drivers/steelseries/rival-3-v2-hid.d.ts +59 -0
- package/dist/drivers/steelseries/rival-3-v2-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/rival-3-v2-hid.js +183 -0
- package/dist/drivers/steelseries/rival-3-v2-hid.js.map +1 -0
- package/dist/drivers/steelseries/rival-3-wireless-v2-hid.d.ts +64 -0
- package/dist/drivers/steelseries/rival-3-wireless-v2-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/rival-3-wireless-v2-hid.js +199 -0
- package/dist/drivers/steelseries/rival-3-wireless-v2-hid.js.map +1 -0
- package/dist/drivers/steelseries/rival-300-hid.d.ts +78 -0
- package/dist/drivers/steelseries/rival-300-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/rival-300-hid.js +206 -0
- package/dist/drivers/steelseries/rival-300-hid.js.map +1 -0
- package/dist/drivers/steelseries/rival-5-hid.d.ts +55 -0
- package/dist/drivers/steelseries/rival-5-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/rival-5-hid.js +177 -0
- package/dist/drivers/steelseries/rival-5-hid.js.map +1 -0
- package/dist/drivers/steelseries/rival-600-hid.d.ts +65 -0
- package/dist/drivers/steelseries/rival-600-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/rival-600-hid.js +184 -0
- package/dist/drivers/steelseries/rival-600-hid.js.map +1 -0
- package/dist/drivers/steelseries/sensei-310-hid.d.ts +54 -0
- package/dist/drivers/steelseries/sensei-310-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/sensei-310-hid.js +177 -0
- package/dist/drivers/steelseries/sensei-310-hid.js.map +1 -0
- package/dist/drivers/steelseries/sensei-raw-hid.d.ts +75 -0
- package/dist/drivers/steelseries/sensei-raw-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/sensei-raw-hid.js +199 -0
- package/dist/drivers/steelseries/sensei-raw-hid.js.map +1 -0
- package/dist/drivers/steelseries/sensei-rival-pro-hid.d.ts +42 -0
- package/dist/drivers/steelseries/sensei-rival-pro-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/sensei-rival-pro-hid.js +132 -0
- package/dist/drivers/steelseries/sensei-rival-pro-hid.js.map +1 -0
- package/dist/steelseries/aerox-3-wireless-gen2.d.ts +204 -0
- package/dist/steelseries/aerox-3-wireless-gen2.d.ts.map +1 -0
- package/dist/steelseries/aerox-3-wireless-gen2.js +301 -0
- package/dist/steelseries/aerox-3-wireless-gen2.js.map +1 -0
- package/dist/steelseries/aerox3.d.ts +3 -3
- package/dist/steelseries/aerox3.js +3 -3
- package/dist/steelseries/devices.d.ts +31 -14
- package/dist/steelseries/devices.d.ts.map +1 -1
- package/dist/steelseries/devices.js +417 -13
- package/dist/steelseries/devices.js.map +1 -1
- package/dist/steelseries/index.d.ts +12 -0
- package/dist/steelseries/index.d.ts.map +1 -1
- package/dist/steelseries/index.js +12 -0
- package/dist/steelseries/index.js.map +1 -1
- package/dist/steelseries/prime-mini-wireless.d.ts +9 -14
- package/dist/steelseries/prime-mini-wireless.d.ts.map +1 -1
- package/dist/steelseries/prime-mini-wireless.js +9 -14
- package/dist/steelseries/prime-mini-wireless.js.map +1 -1
- package/dist/steelseries/prime-mini.d.ts +173 -0
- package/dist/steelseries/prime-mini.d.ts.map +1 -0
- package/dist/steelseries/prime-mini.js +273 -0
- package/dist/steelseries/prime-mini.js.map +1 -0
- package/dist/steelseries/prime-plus.d.ts +5 -4
- package/dist/steelseries/prime-plus.d.ts.map +1 -1
- package/dist/steelseries/prime-plus.js +5 -4
- package/dist/steelseries/prime-plus.js.map +1 -1
- package/dist/steelseries/rival-100.d.ts +134 -0
- package/dist/steelseries/rival-100.d.ts.map +1 -0
- package/dist/steelseries/rival-100.js +195 -0
- package/dist/steelseries/rival-100.js.map +1 -0
- package/dist/steelseries/rival-110.d.ts +134 -0
- package/dist/steelseries/rival-110.d.ts.map +1 -0
- package/dist/steelseries/rival-110.js +205 -0
- package/dist/steelseries/rival-110.js.map +1 -0
- package/dist/steelseries/rival-3-v2.d.ts +168 -0
- package/dist/steelseries/rival-3-v2.d.ts.map +1 -0
- package/dist/steelseries/rival-3-v2.js +242 -0
- package/dist/steelseries/rival-3-v2.js.map +1 -0
- package/dist/steelseries/rival-3-wireless-v2.d.ts +219 -0
- package/dist/steelseries/rival-3-wireless-v2.d.ts.map +1 -0
- package/dist/steelseries/rival-3-wireless-v2.js +270 -0
- package/dist/steelseries/rival-3-wireless-v2.js.map +1 -0
- package/dist/steelseries/rival-300.d.ts +163 -0
- package/dist/steelseries/rival-300.d.ts.map +1 -0
- package/dist/steelseries/rival-300.js +266 -0
- package/dist/steelseries/rival-300.js.map +1 -0
- package/dist/steelseries/rival-5.d.ts +165 -0
- package/dist/steelseries/rival-5.d.ts.map +1 -0
- package/dist/steelseries/rival-5.js +212 -0
- package/dist/steelseries/rival-5.js.map +1 -0
- package/dist/steelseries/rival-600.d.ts +194 -0
- package/dist/steelseries/rival-600.d.ts.map +1 -0
- package/dist/steelseries/rival-600.js +262 -0
- package/dist/steelseries/rival-600.js.map +1 -0
- package/dist/steelseries/sensei-310.d.ts +162 -0
- package/dist/steelseries/sensei-310.d.ts.map +1 -0
- package/dist/steelseries/sensei-310.js +250 -0
- package/dist/steelseries/sensei-310.js.map +1 -0
- package/dist/steelseries/sensei-raw.d.ts +169 -0
- package/dist/steelseries/sensei-raw.d.ts.map +1 -0
- package/dist/steelseries/sensei-raw.js +233 -0
- package/dist/steelseries/sensei-raw.js.map +1 -0
- package/dist/steelseries/sensei-rival-pro.d.ts +214 -0
- package/dist/steelseries/sensei-rival-pro.d.ts.map +1 -0
- package/dist/steelseries/sensei-rival-pro.js +298 -0
- package/dist/steelseries/sensei-rival-pro.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sensei-rival-pro-hid.js","sourceRoot":"","sources":["../../../src/drivers/steelseries/sensei-rival-pro-hid.ts"],"names":[],"mappings":"AACA,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,EAC1B,oBAAoB,EACpB,qBAAqB,EACrB,mCAAmC,EACnC,6CAA6C,EAC7C,yCAAyC,EACzC,0CAA0C,EAC1C,oCAAoC,GAIrC,MAAM,iCAAiC,CAAC;AAEzC,uFAAuF;AACvF,MAAM,WAAW,GAAG,GAAG,CAAC;AACxB,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAChC,oGAAoG;AACpG,MAAM,yBAAyB,GAAG,CAAC,CAAC;AACpC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAEnC;;;;;;;;;;;;;;;;;;;GAmBG;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CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC;IACrE,CAAC;IAEO,KAAK,CAAC,GAAG,CAAI,SAA2B;QAC9C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QACrD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QAC3D,OAAO,MAAM,MAAM,CAAC;IACtB,CAAC;CACF"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SteelSeries Aerox 3 Wireless Gen 2 configuration protocol — pure
|
|
3
|
+
* encode/decode helpers.
|
|
4
|
+
*
|
|
5
|
+
* Reconstructed from the vendor's own software, not from a third-party
|
|
6
|
+
* reimplementation: SteelSeries GG 121.0.0 ships
|
|
7
|
+
* `aerox_3_wireless_gen2_{mouse,dongle,shared}.lisp` under
|
|
8
|
+
* `apps/engine/install/deviceSpecifications/`, and this module transcribes
|
|
9
|
+
* them. Those files are OpenPGP-armored ("DESCRIPTOR" armor, SKESK/AES-128);
|
|
10
|
+
* the bytes below are the documented HID report payloads, not guesses. No
|
|
11
|
+
* other public implementation of this protocol was available to corroborate
|
|
12
|
+
* against — rivalcfg has no Aerox 3 Wireless Gen 2 profile — so treat every
|
|
13
|
+
* byte as vendor-documented but not yet hardware-verified.
|
|
14
|
+
*
|
|
15
|
+
* Despite the shared "Aerox 3 Wireless" name this is a different command
|
|
16
|
+
* set from the Gen 1 (`./aerox3-wireless.ts`: one-byte TrueMove Air DPI
|
|
17
|
+
* `0x2D`, polling `0x2B` with values `00–03`, sleep/dim timers, fixed
|
|
18
|
+
* rainbow enable). Gen 2 carries raw-uint16 XY DPI with per-preset
|
|
19
|
+
* lift-off, split wired/wireless polling rates, and a different lighting
|
|
20
|
+
* and power scheme. Do not reuse the Gen 1 module.
|
|
21
|
+
*
|
|
22
|
+
* Transports share one module via the usual SteelSeries wireless
|
|
23
|
+
* transform: the mouse (`1038:1892`) uses command bytes as documented, and
|
|
24
|
+
* the 2.4 GHz dongle (`1038:1890`) ORs `0b01000000` into byte 0 of every
|
|
25
|
+
* command (`applyAerox3WirelessGen2Flag`), confirmed by diffing the
|
|
26
|
+
* mouse/dongle specification files, not assumed from precedent.
|
|
27
|
+
*
|
|
28
|
+
* Every command is an HID **output report** with report id 0x00 (65-byte
|
|
29
|
+
* reports throughout the specification).
|
|
30
|
+
*
|
|
31
|
+
* DPI uses an XY batch (`0x2D`): `num_dpi_levels` (0x01–0x05), `index`
|
|
32
|
+
* (0x00–0x04, 0-based), then five 5-byte `mouse_sensitivity` structs (x
|
|
33
|
+
* uint16LE, y uint16LE, lift_off_distance uint8). Values are raw uint16 —
|
|
34
|
+
* no sensor lookup table. The specification states no DPI bounds; the
|
|
35
|
+
* 100–26000 range accepted here follows the TrueMove 26K sensor cap and
|
|
36
|
+
* the 100-DPI floor of every other modern SteelSeries family, and is
|
|
37
|
+
* flagged as such rather than as a vendor-file claim. The lift-off byte
|
|
38
|
+
* has no documented range and is passed through. The specification always
|
|
39
|
+
* carries all five structs, so this codec requires exactly five presets
|
|
40
|
+
* rather than guessing at padding for shorter tables.
|
|
41
|
+
*
|
|
42
|
+
* Polling (`0x2B`) carries separate `wireless_rate` (0x00–0x05) and
|
|
43
|
+
* `wired_rate` (0x02–0x05) bytes plus a 300 ms settle delay, with a
|
|
44
|
+
* read-back (`0xAB`, same fields). No value→Hz table appears in the
|
|
45
|
+
* specification; the mapping used here (0→4000, 1→2000, 2→1000, 3→500,
|
|
46
|
+
* 4→250, 5→125) is inferred from two facts: the mouse is advertised as 4K
|
|
47
|
+
* wireless, and the wired range starts one step in (02), which only makes
|
|
48
|
+
* sense if 02 is 1000 Hz — flag it as inference, not a file claim.
|
|
49
|
+
*
|
|
50
|
+
* Buttons are one 40-byte packet (8 slots × 5-byte fields: 6 physical
|
|
51
|
+
* buttons plus scroll up/down), command `0x2A`, with a read-back (`0xAA`)
|
|
52
|
+
* defined but not decoded here.
|
|
53
|
+
*
|
|
54
|
+
* Known but deliberately not implemented — documented so nobody re-derives
|
|
55
|
+
* them, withheld until there is hardware evidence and a reason to ship them:
|
|
56
|
+
*
|
|
57
|
+
* - The 3-zone lighting commands (`direct_write`/`write_all_illumination`
|
|
58
|
+
* `0x21`, `lighting_settings` `0x23` + read `0xA3`, restart/disable
|
|
59
|
+
* `0x24`, idle `0x25`, `read_color_spin` `0xBE`). There is no default or
|
|
60
|
+
* reactive lighting on this mouse, unlike Gen 1.
|
|
61
|
+
* - `high_efficiency_mode` (`0x28` + read `0xA8`), `wireless_stability`
|
|
62
|
+
* (`0x15` + read `0x95`), angle snapping / mouse rotation / scroll jump /
|
|
63
|
+
* acceleration tables (`0x16`/`0x17` + reads `0x96`/`0x97`).
|
|
64
|
+
* - `restore_factory_default` (`0x91`).
|
|
65
|
+
*
|
|
66
|
+
* Settings apply immediately; the save command (`11 00`) persists them to
|
|
67
|
+
* onboard flash. None of this has been verified on physical hardware by
|
|
68
|
+
* this project.
|
|
69
|
+
*/
|
|
70
|
+
/** Wired (mouse-mode) command bytes; see `applyAerox3WirelessGen2Flag` for dongle mode. */
|
|
71
|
+
export declare const AEROX3_WIRELESS_GEN2_COMMAND: {
|
|
72
|
+
readonly dpiPresets: readonly [45];
|
|
73
|
+
readonly pollingRate: readonly [43];
|
|
74
|
+
readonly buttonsMapping: readonly [42];
|
|
75
|
+
readonly batteryLevel: readonly [146];
|
|
76
|
+
readonly firmware: readonly [144, 0];
|
|
77
|
+
readonly save: readonly [17, 0];
|
|
78
|
+
};
|
|
79
|
+
export declare const AEROX3_WIRELESS_GEN2_REPORT_ID = 0;
|
|
80
|
+
/**
|
|
81
|
+
* Dongle-mode transform: OR `0b01000000` into the command's first byte.
|
|
82
|
+
* Pass the wired-mode command bytes; returns the 2.4 GHz-mode equivalent.
|
|
83
|
+
*/
|
|
84
|
+
export declare function applyAerox3WirelessGen2Flag(command: readonly number[]): number[];
|
|
85
|
+
/**
|
|
86
|
+
* Inferred value map (see the module doc comment): 0→4000, 1→2000,
|
|
87
|
+
* 2→1000, 3→500, 4→250, 5→125. The wireless field accepts all six; the
|
|
88
|
+
* wired field accepts 2–5 (1000 Hz and below).
|
|
89
|
+
*/
|
|
90
|
+
export declare const AEROX3_WIRELESS_GEN2_POLLING_RATES: readonly [125, 250, 500, 1000, 2000, 4000];
|
|
91
|
+
/** No DPI bounds appear in the specification; see the module doc comment. */
|
|
92
|
+
export declare const AEROX3_WIRELESS_GEN2_DPI_MIN = 100;
|
|
93
|
+
export declare const AEROX3_WIRELESS_GEN2_DPI_MAX = 26000;
|
|
94
|
+
export declare const AEROX3_WIRELESS_GEN2_DPI_STEP = 100;
|
|
95
|
+
export declare const AEROX3_WIRELESS_GEN2_MAX_DPI_PRESETS = 5;
|
|
96
|
+
export declare const AEROX3_WIRELESS_GEN2_BATTERY_RESPONSE_LENGTH = 2;
|
|
97
|
+
export declare const AEROX3_WIRELESS_GEN2_FIRMWARE_RESPONSE_LENGTH = 12;
|
|
98
|
+
/** Common factory table shared across the modern SteelSeries families. */
|
|
99
|
+
export declare const AEROX3_WIRELESS_GEN2_DEFAULT_DPI_PRESETS: readonly [400, 800, 1600, 2400, 3200];
|
|
100
|
+
export declare const AEROX3_WIRELESS_GEN2_DEFAULT_POLLING_RATE = 1000;
|
|
101
|
+
export declare class Aerox3WirelessGen2ProtocolError extends Error {
|
|
102
|
+
}
|
|
103
|
+
/** One DPI preset: independent X/Y sensitivities plus lift-off distance. */
|
|
104
|
+
export interface Aerox3WirelessGen2DpiPreset {
|
|
105
|
+
x: number;
|
|
106
|
+
y: number;
|
|
107
|
+
/** Lift-off distance byte; no vendor range — passed through. */
|
|
108
|
+
liftOffDistance: number;
|
|
109
|
+
}
|
|
110
|
+
/** UI DPI options: 100–26000 in 100 DPI steps (see bounds disclosure above). */
|
|
111
|
+
export declare function steelseriesAerox3WirelessGen2DpiOptions(): number[];
|
|
112
|
+
/**
|
|
113
|
+
* `2D <count 1–5> <selected 0-based> <5× (x u16LE, y u16LE, lod)>` —
|
|
114
|
+
* replaces the mouse's whole preset table. Exactly five presets are
|
|
115
|
+
* required (see the module doc comment).
|
|
116
|
+
*/
|
|
117
|
+
export declare function steelseriesAerox3WirelessGen2EncodeDpiPresets(presets: readonly Aerox3WirelessGen2DpiPreset[], selectedIndex: number, wireless: boolean): Uint8Array;
|
|
118
|
+
/**
|
|
119
|
+
* `2B <wireless rate> <wired rate>` — one polling level for each transport.
|
|
120
|
+
* Rates above 1000 Hz exceed the wired field's range, so the wired byte is
|
|
121
|
+
* capped at 1000 Hz; both assumptions are flagged in the module doc
|
|
122
|
+
* comment.
|
|
123
|
+
*/
|
|
124
|
+
export declare function steelseriesAerox3WirelessGen2EncodePollingRate(wirelessHz: number, wiredHz: number, wireless: boolean): Uint8Array;
|
|
125
|
+
/** Convenience form: one rate for wireless, capped at 1000 Hz for wired. */
|
|
126
|
+
export declare function steelseriesAerox3WirelessGen2EncodePollingRateSingle(pollingRateHz: number, wireless: boolean): Uint8Array;
|
|
127
|
+
/** `11 00` wired / `51 00` dongle — commit the current settings to onboard flash. */
|
|
128
|
+
export declare function steelseriesAerox3WirelessGen2SaveCommand(wireless: boolean): Uint8Array;
|
|
129
|
+
/** `92` / `D2` — answered by a two-byte input report. */
|
|
130
|
+
export declare function steelseriesAerox3WirelessGen2BatteryQuery(wireless: boolean): Uint8Array;
|
|
131
|
+
export interface Aerox3WirelessGen2Battery {
|
|
132
|
+
/** Battery percentage, reported directly. */
|
|
133
|
+
level: number;
|
|
134
|
+
/** Charging/status byte, passed through — its encoding is undocumented. */
|
|
135
|
+
status: number;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Decode the two-byte battery reply (`battery_status`, `battery_value`).
|
|
139
|
+
* The value is a direct percentage (the specification forwards it to the
|
|
140
|
+
* UI unchanged); the status byte's encoding is undocumented, so it is
|
|
141
|
+
* returned raw and must not be interpreted as a charging flag.
|
|
142
|
+
*/
|
|
143
|
+
export declare function steelseriesAerox3WirelessGen2DecodeBattery(payload: Uint8Array): Aerox3WirelessGen2Battery;
|
|
144
|
+
/** `90 00` / `D0 00` — the device answers with a 12-byte version string. */
|
|
145
|
+
export declare function steelseriesAerox3WirelessGen2FirmwareQuery(wireless: boolean): Uint8Array;
|
|
146
|
+
/** Decode the 12-byte firmware version reply as ASCII, stopping at the first NUL. */
|
|
147
|
+
export declare function steelseriesAerox3WirelessGen2DecodeFirmware(payload: Uint8Array): string;
|
|
148
|
+
/** 6 physical buttons plus scroll up/down (8 slots). */
|
|
149
|
+
export declare const AEROX3_WIRELESS_GEN2_BUTTONS: {
|
|
150
|
+
readonly button1: {
|
|
151
|
+
readonly id: 1;
|
|
152
|
+
readonly offset: 0;
|
|
153
|
+
};
|
|
154
|
+
readonly button2: {
|
|
155
|
+
readonly id: 2;
|
|
156
|
+
readonly offset: 5;
|
|
157
|
+
};
|
|
158
|
+
readonly button3: {
|
|
159
|
+
readonly id: 3;
|
|
160
|
+
readonly offset: 10;
|
|
161
|
+
};
|
|
162
|
+
readonly button4: {
|
|
163
|
+
readonly id: 4;
|
|
164
|
+
readonly offset: 15;
|
|
165
|
+
};
|
|
166
|
+
readonly button5: {
|
|
167
|
+
readonly id: 5;
|
|
168
|
+
readonly offset: 20;
|
|
169
|
+
};
|
|
170
|
+
readonly button6: {
|
|
171
|
+
readonly id: 6;
|
|
172
|
+
readonly offset: 25;
|
|
173
|
+
};
|
|
174
|
+
readonly scrollUp: {
|
|
175
|
+
readonly id: 49;
|
|
176
|
+
readonly offset: 30;
|
|
177
|
+
};
|
|
178
|
+
readonly scrollDown: {
|
|
179
|
+
readonly id: 50;
|
|
180
|
+
readonly offset: 35;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
export type Aerox3WirelessGen2ButtonName = keyof typeof AEROX3_WIRELESS_GEN2_BUTTONS;
|
|
184
|
+
export type Aerox3WirelessGen2ButtonAction = {
|
|
185
|
+
type: "button";
|
|
186
|
+
target: Aerox3WirelessGen2ButtonName;
|
|
187
|
+
} | {
|
|
188
|
+
type: "disabled";
|
|
189
|
+
} | {
|
|
190
|
+
type: "dpiSwitch";
|
|
191
|
+
} | {
|
|
192
|
+
type: "keyboard";
|
|
193
|
+
code: number;
|
|
194
|
+
} | {
|
|
195
|
+
type: "multimedia";
|
|
196
|
+
code: number;
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* `2A` + one 40-byte packet (8 slots × 5-byte fields), zero-filled except
|
|
200
|
+
* where a mapping is given. Pass every button explicitly — unmapped buttons
|
|
201
|
+
* stay disabled, matching this package's no-silent-defaults policy.
|
|
202
|
+
*/
|
|
203
|
+
export declare function steelseriesAerox3WirelessGen2EncodeButtonsMapping(mapping: Partial<Record<Aerox3WirelessGen2ButtonName, Aerox3WirelessGen2ButtonAction>>, wireless: boolean): Uint8Array;
|
|
204
|
+
//# sourceMappingURL=aerox-3-wireless-gen2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aerox-3-wireless-gen2.d.ts","sourceRoot":"","sources":["../../src/steelseries/aerox-3-wireless-gen2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AAIH,2FAA2F;AAC3F,eAAO,MAAM,4BAA4B;;;;;;;CAO/B,CAAC;AAEX,eAAO,MAAM,8BAA8B,IAAO,CAAC;AAEnD;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAKhF;AAMD;;;;GAIG;AACH,eAAO,MAAM,kCAAkC,4CAA6C,CAAC;AAW7F,6EAA6E;AAC7E,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAChD,eAAO,MAAM,4BAA4B,QAAQ,CAAC;AAClD,eAAO,MAAM,6BAA6B,M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AAED,4EAA4E;AAC5E,wBAAgB,0CAA0C,CAAC,QAAQ,EAAE,OAAO,GAAG,UAAU,CAExF;AAED,qFAAqF;AACrF,wBAAgB,2CAA2C,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAOvF;AAID,wDAAwD;AACxD,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS0B,CAAC;AAEpE,MAAM,MAAM,4BAA4B,GAAG,MAAM,OAAO,4BAA4B,CAAC;AAQrF,MAAM,MAAM,8BAA8B,GACtC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,4BAA4B,CAAA;CAAE,GACxD;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GACrB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AASzC;;;;GAIG;AACH,wBAAgB,iDAAiD,CAC/D,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,4BAA4B,EAAE,8BAA8B,CAAC,CAAC,EACtF,QAAQ,EAAE,OAAO,GAChB,UAAU,CA6CZ"}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SteelSeries Aerox 3 Wireless Gen 2 configuration protocol — pure
|
|
3
|
+
* encode/decode helpers.
|
|
4
|
+
*
|
|
5
|
+
* Reconstructed from the vendor's own software, not from a third-party
|
|
6
|
+
* reimplementation: SteelSeries GG 121.0.0 ships
|
|
7
|
+
* `aerox_3_wireless_gen2_{mouse,dongle,shared}.lisp` under
|
|
8
|
+
* `apps/engine/install/deviceSpecifications/`, and this module transcribes
|
|
9
|
+
* them. Those files are OpenPGP-armored ("DESCRIPTOR" armor, SKESK/AES-128);
|
|
10
|
+
* the bytes below are the documented HID report payloads, not guesses. No
|
|
11
|
+
* other public implementation of this protocol was available to corroborate
|
|
12
|
+
* against — rivalcfg has no Aerox 3 Wireless Gen 2 profile — so treat every
|
|
13
|
+
* byte as vendor-documented but not yet hardware-verified.
|
|
14
|
+
*
|
|
15
|
+
* Despite the shared "Aerox 3 Wireless" name this is a different command
|
|
16
|
+
* set from the Gen 1 (`./aerox3-wireless.ts`: one-byte TrueMove Air DPI
|
|
17
|
+
* `0x2D`, polling `0x2B` with values `00–03`, sleep/dim timers, fixed
|
|
18
|
+
* rainbow enable). Gen 2 carries raw-uint16 XY DPI with per-preset
|
|
19
|
+
* lift-off, split wired/wireless polling rates, and a different lighting
|
|
20
|
+
* and power scheme. Do not reuse the Gen 1 module.
|
|
21
|
+
*
|
|
22
|
+
* Transports share one module via the usual SteelSeries wireless
|
|
23
|
+
* transform: the mouse (`1038:1892`) uses command bytes as documented, and
|
|
24
|
+
* the 2.4 GHz dongle (`1038:1890`) ORs `0b01000000` into byte 0 of every
|
|
25
|
+
* command (`applyAerox3WirelessGen2Flag`), confirmed by diffing the
|
|
26
|
+
* mouse/dongle specification files, not assumed from precedent.
|
|
27
|
+
*
|
|
28
|
+
* Every command is an HID **output report** with report id 0x00 (65-byte
|
|
29
|
+
* reports throughout the specification).
|
|
30
|
+
*
|
|
31
|
+
* DPI uses an XY batch (`0x2D`): `num_dpi_levels` (0x01–0x05), `index`
|
|
32
|
+
* (0x00–0x04, 0-based), then five 5-byte `mouse_sensitivity` structs (x
|
|
33
|
+
* uint16LE, y uint16LE, lift_off_distance uint8). Values are raw uint16 —
|
|
34
|
+
* no sensor lookup table. The specification states no DPI bounds; the
|
|
35
|
+
* 100–26000 range accepted here follows the TrueMove 26K sensor cap and
|
|
36
|
+
* the 100-DPI floor of every other modern SteelSeries family, and is
|
|
37
|
+
* flagged as such rather than as a vendor-file claim. The lift-off byte
|
|
38
|
+
* has no documented range and is passed through. The specification always
|
|
39
|
+
* carries all five structs, so this codec requires exactly five presets
|
|
40
|
+
* rather than guessing at padding for shorter tables.
|
|
41
|
+
*
|
|
42
|
+
* Polling (`0x2B`) carries separate `wireless_rate` (0x00–0x05) and
|
|
43
|
+
* `wired_rate` (0x02–0x05) bytes plus a 300 ms settle delay, with a
|
|
44
|
+
* read-back (`0xAB`, same fields). No value→Hz table appears in the
|
|
45
|
+
* specification; the mapping used here (0→4000, 1→2000, 2→1000, 3→500,
|
|
46
|
+
* 4→250, 5→125) is inferred from two facts: the mouse is advertised as 4K
|
|
47
|
+
* wireless, and the wired range starts one step in (02), which only makes
|
|
48
|
+
* sense if 02 is 1000 Hz — flag it as inference, not a file claim.
|
|
49
|
+
*
|
|
50
|
+
* Buttons are one 40-byte packet (8 slots × 5-byte fields: 6 physical
|
|
51
|
+
* buttons plus scroll up/down), command `0x2A`, with a read-back (`0xAA`)
|
|
52
|
+
* defined but not decoded here.
|
|
53
|
+
*
|
|
54
|
+
* Known but deliberately not implemented — documented so nobody re-derives
|
|
55
|
+
* them, withheld until there is hardware evidence and a reason to ship them:
|
|
56
|
+
*
|
|
57
|
+
* - The 3-zone lighting commands (`direct_write`/`write_all_illumination`
|
|
58
|
+
* `0x21`, `lighting_settings` `0x23` + read `0xA3`, restart/disable
|
|
59
|
+
* `0x24`, idle `0x25`, `read_color_spin` `0xBE`). There is no default or
|
|
60
|
+
* reactive lighting on this mouse, unlike Gen 1.
|
|
61
|
+
* - `high_efficiency_mode` (`0x28` + read `0xA8`), `wireless_stability`
|
|
62
|
+
* (`0x15` + read `0x95`), angle snapping / mouse rotation / scroll jump /
|
|
63
|
+
* acceleration tables (`0x16`/`0x17` + reads `0x96`/`0x97`).
|
|
64
|
+
* - `restore_factory_default` (`0x91`).
|
|
65
|
+
*
|
|
66
|
+
* Settings apply immediately; the save command (`11 00`) persists them to
|
|
67
|
+
* onboard flash. None of this has been verified on physical hardware by
|
|
68
|
+
* this project.
|
|
69
|
+
*/
|
|
70
|
+
const WIRELESS_FLAG = 0b01000000;
|
|
71
|
+
/** Wired (mouse-mode) command bytes; see `applyAerox3WirelessGen2Flag` for dongle mode. */
|
|
72
|
+
export const AEROX3_WIRELESS_GEN2_COMMAND = {
|
|
73
|
+
dpiPresets: [0x2d],
|
|
74
|
+
pollingRate: [0x2b],
|
|
75
|
+
buttonsMapping: [0x2a],
|
|
76
|
+
batteryLevel: [0x92],
|
|
77
|
+
firmware: [0x90, 0x00],
|
|
78
|
+
save: [0x11, 0x00],
|
|
79
|
+
};
|
|
80
|
+
export const AEROX3_WIRELESS_GEN2_REPORT_ID = 0x00;
|
|
81
|
+
/**
|
|
82
|
+
* Dongle-mode transform: OR `0b01000000` into the command's first byte.
|
|
83
|
+
* Pass the wired-mode command bytes; returns the 2.4 GHz-mode equivalent.
|
|
84
|
+
*/
|
|
85
|
+
export function applyAerox3WirelessGen2Flag(command) {
|
|
86
|
+
if (command.length === 0) {
|
|
87
|
+
throw new Aerox3WirelessGen2ProtocolError("Cannot apply the wireless flag to an empty command.");
|
|
88
|
+
}
|
|
89
|
+
return [command[0] | WIRELESS_FLAG, ...command.slice(1)];
|
|
90
|
+
}
|
|
91
|
+
function frame(command, wireless) {
|
|
92
|
+
return wireless ? applyAerox3WirelessGen2Flag(command) : [...command];
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Inferred value map (see the module doc comment): 0→4000, 1→2000,
|
|
96
|
+
* 2→1000, 3→500, 4→250, 5→125. The wireless field accepts all six; the
|
|
97
|
+
* wired field accepts 2–5 (1000 Hz and below).
|
|
98
|
+
*/
|
|
99
|
+
export const AEROX3_WIRELESS_GEN2_POLLING_RATES = [125, 250, 500, 1000, 2000, 4000];
|
|
100
|
+
const POLLING_RATE_TO_BYTE = new Map([
|
|
101
|
+
[4000, 0x00],
|
|
102
|
+
[2000, 0x01],
|
|
103
|
+
[1000, 0x02],
|
|
104
|
+
[500, 0x03],
|
|
105
|
+
[250, 0x04],
|
|
106
|
+
[125, 0x05],
|
|
107
|
+
]);
|
|
108
|
+
/** No DPI bounds appear in the specification; see the module doc comment. */
|
|
109
|
+
export const AEROX3_WIRELESS_GEN2_DPI_MIN = 100;
|
|
110
|
+
export const AEROX3_WIRELESS_GEN2_DPI_MAX = 26000;
|
|
111
|
+
export const AEROX3_WIRELESS_GEN2_DPI_STEP = 100;
|
|
112
|
+
export const AEROX3_WIRELESS_GEN2_MAX_DPI_PRESETS = 5;
|
|
113
|
+
export const AEROX3_WIRELESS_GEN2_BATTERY_RESPONSE_LENGTH = 2;
|
|
114
|
+
export const AEROX3_WIRELESS_GEN2_FIRMWARE_RESPONSE_LENGTH = 12;
|
|
115
|
+
/** Common factory table shared across the modern SteelSeries families. */
|
|
116
|
+
export const AEROX3_WIRELESS_GEN2_DEFAULT_DPI_PRESETS = [400, 800, 1600, 2400, 3200];
|
|
117
|
+
export const AEROX3_WIRELESS_GEN2_DEFAULT_POLLING_RATE = 1000;
|
|
118
|
+
export class Aerox3WirelessGen2ProtocolError extends Error {
|
|
119
|
+
}
|
|
120
|
+
/** UI DPI options: 100–26000 in 100 DPI steps (see bounds disclosure above). */
|
|
121
|
+
export function steelseriesAerox3WirelessGen2DpiOptions() {
|
|
122
|
+
const options = [];
|
|
123
|
+
for (let dpi = AEROX3_WIRELESS_GEN2_DPI_MIN; dpi <= AEROX3_WIRELESS_GEN2_DPI_MAX; dpi += AEROX3_WIRELESS_GEN2_DPI_STEP) {
|
|
124
|
+
options.push(dpi);
|
|
125
|
+
}
|
|
126
|
+
return options;
|
|
127
|
+
}
|
|
128
|
+
function checkDpi(value) {
|
|
129
|
+
if (!Number.isInteger(value) ||
|
|
130
|
+
value < AEROX3_WIRELESS_GEN2_DPI_MIN ||
|
|
131
|
+
value > AEROX3_WIRELESS_GEN2_DPI_MAX ||
|
|
132
|
+
(value - AEROX3_WIRELESS_GEN2_DPI_MIN) % AEROX3_WIRELESS_GEN2_DPI_STEP !== 0) {
|
|
133
|
+
throw new Aerox3WirelessGen2ProtocolError(`SteelSeries Aerox 3 Wireless Gen 2 DPI must be ${AEROX3_WIRELESS_GEN2_DPI_MIN}–${AEROX3_WIRELESS_GEN2_DPI_MAX.toLocaleString("en-US")} in ${AEROX3_WIRELESS_GEN2_DPI_STEP} DPI steps.`);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
function checkByte(value, what) {
|
|
137
|
+
if (!Number.isInteger(value) || value < 0 || value > 255) {
|
|
138
|
+
throw new Aerox3WirelessGen2ProtocolError(`${what} must be an integer 0–255.`);
|
|
139
|
+
}
|
|
140
|
+
return value;
|
|
141
|
+
}
|
|
142
|
+
function encodePreset(preset) {
|
|
143
|
+
checkDpi(preset.x);
|
|
144
|
+
checkDpi(preset.y);
|
|
145
|
+
checkByte(preset.liftOffDistance, "Lift-off distance");
|
|
146
|
+
return [
|
|
147
|
+
preset.x & 0xff, (preset.x >> 8) & 0xff,
|
|
148
|
+
preset.y & 0xff, (preset.y >> 8) & 0xff,
|
|
149
|
+
preset.liftOffDistance,
|
|
150
|
+
];
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* `2D <count 1–5> <selected 0-based> <5× (x u16LE, y u16LE, lod)>` —
|
|
154
|
+
* replaces the mouse's whole preset table. Exactly five presets are
|
|
155
|
+
* required (see the module doc comment).
|
|
156
|
+
*/
|
|
157
|
+
export function steelseriesAerox3WirelessGen2EncodeDpiPresets(presets, selectedIndex, wireless) {
|
|
158
|
+
if (presets.length !== AEROX3_WIRELESS_GEN2_MAX_DPI_PRESETS) {
|
|
159
|
+
throw new Aerox3WirelessGen2ProtocolError(`SteelSeries Aerox 3 Wireless Gen 2 requires exactly ${AEROX3_WIRELESS_GEN2_MAX_DPI_PRESETS} DPI presets.`);
|
|
160
|
+
}
|
|
161
|
+
if (!Number.isInteger(selectedIndex) || selectedIndex < 0 || selectedIndex >= presets.length) {
|
|
162
|
+
throw new Aerox3WirelessGen2ProtocolError(`Selected DPI preset must be an index into the ${presets.length} presets being written.`);
|
|
163
|
+
}
|
|
164
|
+
return new Uint8Array([
|
|
165
|
+
...frame(AEROX3_WIRELESS_GEN2_COMMAND.dpiPresets, wireless),
|
|
166
|
+
presets.length,
|
|
167
|
+
selectedIndex,
|
|
168
|
+
...presets.flatMap(encodePreset),
|
|
169
|
+
]);
|
|
170
|
+
}
|
|
171
|
+
function pollingRateToByte(pollingRateHz) {
|
|
172
|
+
const byte = POLLING_RATE_TO_BYTE.get(pollingRateHz);
|
|
173
|
+
if (byte === undefined) {
|
|
174
|
+
throw new Aerox3WirelessGen2ProtocolError(`SteelSeries Aerox 3 Wireless Gen 2 supports ${AEROX3_WIRELESS_GEN2_POLLING_RATES.join(", ")} Hz polling.`);
|
|
175
|
+
}
|
|
176
|
+
return byte;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* `2B <wireless rate> <wired rate>` — one polling level for each transport.
|
|
180
|
+
* Rates above 1000 Hz exceed the wired field's range, so the wired byte is
|
|
181
|
+
* capped at 1000 Hz; both assumptions are flagged in the module doc
|
|
182
|
+
* comment.
|
|
183
|
+
*/
|
|
184
|
+
export function steelseriesAerox3WirelessGen2EncodePollingRate(wirelessHz, wiredHz, wireless) {
|
|
185
|
+
const wirelessByte = pollingRateToByte(wirelessHz);
|
|
186
|
+
const wiredByte = pollingRateToByte(wiredHz);
|
|
187
|
+
if (wiredByte < 0x02) {
|
|
188
|
+
throw new Aerox3WirelessGen2ProtocolError("SteelSeries Aerox 3 Wireless Gen 2 wired rate must be 1000 Hz or below.");
|
|
189
|
+
}
|
|
190
|
+
return new Uint8Array([...frame(AEROX3_WIRELESS_GEN2_COMMAND.pollingRate, wireless), wirelessByte, wiredByte]);
|
|
191
|
+
}
|
|
192
|
+
/** Convenience form: one rate for wireless, capped at 1000 Hz for wired. */
|
|
193
|
+
export function steelseriesAerox3WirelessGen2EncodePollingRateSingle(pollingRateHz, wireless) {
|
|
194
|
+
const byte = pollingRateToByte(pollingRateHz);
|
|
195
|
+
return steelseriesAerox3WirelessGen2EncodePollingRate(pollingRateHz, byte < 0x02 ? 1000 : pollingRateHz, wireless);
|
|
196
|
+
}
|
|
197
|
+
/** `11 00` wired / `51 00` dongle — commit the current settings to onboard flash. */
|
|
198
|
+
export function steelseriesAerox3WirelessGen2SaveCommand(wireless) {
|
|
199
|
+
return new Uint8Array(frame(AEROX3_WIRELESS_GEN2_COMMAND.save, wireless));
|
|
200
|
+
}
|
|
201
|
+
/** `92` / `D2` — answered by a two-byte input report. */
|
|
202
|
+
export function steelseriesAerox3WirelessGen2BatteryQuery(wireless) {
|
|
203
|
+
return new Uint8Array(frame(AEROX3_WIRELESS_GEN2_COMMAND.batteryLevel, wireless));
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Decode the two-byte battery reply (`battery_status`, `battery_value`).
|
|
207
|
+
* The value is a direct percentage (the specification forwards it to the
|
|
208
|
+
* UI unchanged); the status byte's encoding is undocumented, so it is
|
|
209
|
+
* returned raw and must not be interpreted as a charging flag.
|
|
210
|
+
*/
|
|
211
|
+
export function steelseriesAerox3WirelessGen2DecodeBattery(payload) {
|
|
212
|
+
if (payload.length < AEROX3_WIRELESS_GEN2_BATTERY_RESPONSE_LENGTH) {
|
|
213
|
+
throw new Aerox3WirelessGen2ProtocolError("SteelSeries Aerox 3 Wireless Gen 2 battery response is shorter than two bytes.");
|
|
214
|
+
}
|
|
215
|
+
return { level: payload[1], status: payload[0] };
|
|
216
|
+
}
|
|
217
|
+
/** `90 00` / `D0 00` — the device answers with a 12-byte version string. */
|
|
218
|
+
export function steelseriesAerox3WirelessGen2FirmwareQuery(wireless) {
|
|
219
|
+
return new Uint8Array(frame(AEROX3_WIRELESS_GEN2_COMMAND.firmware, wireless));
|
|
220
|
+
}
|
|
221
|
+
/** Decode the 12-byte firmware version reply as ASCII, stopping at the first NUL. */
|
|
222
|
+
export function steelseriesAerox3WirelessGen2DecodeFirmware(payload) {
|
|
223
|
+
if (payload.length < AEROX3_WIRELESS_GEN2_FIRMWARE_RESPONSE_LENGTH) {
|
|
224
|
+
throw new Aerox3WirelessGen2ProtocolError("SteelSeries Aerox 3 Wireless Gen 2 firmware response is shorter than 12 bytes.");
|
|
225
|
+
}
|
|
226
|
+
const bytes = payload.slice(0, AEROX3_WIRELESS_GEN2_FIRMWARE_RESPONSE_LENGTH);
|
|
227
|
+
const nul = bytes.indexOf(0x00);
|
|
228
|
+
return new TextDecoder("ascii").decode(nul === -1 ? bytes : bytes.slice(0, nul));
|
|
229
|
+
}
|
|
230
|
+
// -- Button mapping --------------------------------------------------------
|
|
231
|
+
/** 6 physical buttons plus scroll up/down (8 slots). */
|
|
232
|
+
export const AEROX3_WIRELESS_GEN2_BUTTONS = {
|
|
233
|
+
button1: { id: 0x01, offset: 0x00 },
|
|
234
|
+
button2: { id: 0x02, offset: 0x05 },
|
|
235
|
+
button3: { id: 0x03, offset: 0x0a },
|
|
236
|
+
button4: { id: 0x04, offset: 0x0f },
|
|
237
|
+
button5: { id: 0x05, offset: 0x14 },
|
|
238
|
+
button6: { id: 0x06, offset: 0x19 },
|
|
239
|
+
scrollUp: { id: 0x31, offset: 0x1e },
|
|
240
|
+
scrollDown: { id: 0x32, offset: 0x23 },
|
|
241
|
+
};
|
|
242
|
+
const BUTTON_FIELD_LENGTH = 5;
|
|
243
|
+
const BUTTON_DISABLE = 0x00;
|
|
244
|
+
const BUTTON_DPI_SWITCH = 0x30;
|
|
245
|
+
const BUTTON_KEYBOARD = 0x51;
|
|
246
|
+
const BUTTON_MULTIMEDIA = 0x61;
|
|
247
|
+
function encodeKeyCode(code, kind) {
|
|
248
|
+
if (!Number.isInteger(code) || code < 0 || code > 255) {
|
|
249
|
+
throw new Aerox3WirelessGen2ProtocolError(`${kind} codes must be integers 0–255.`);
|
|
250
|
+
}
|
|
251
|
+
return code;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* `2A` + one 40-byte packet (8 slots × 5-byte fields), zero-filled except
|
|
255
|
+
* where a mapping is given. Pass every button explicitly — unmapped buttons
|
|
256
|
+
* stay disabled, matching this package's no-silent-defaults policy.
|
|
257
|
+
*/
|
|
258
|
+
export function steelseriesAerox3WirelessGen2EncodeButtonsMapping(mapping, wireless) {
|
|
259
|
+
for (const name of Object.keys(mapping)) {
|
|
260
|
+
if (!Object.hasOwn(AEROX3_WIRELESS_GEN2_BUTTONS, name)) {
|
|
261
|
+
throw new Aerox3WirelessGen2ProtocolError(`Unknown SteelSeries Aerox 3 Wireless Gen 2 button "${name}".`);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
const names = Object.keys(AEROX3_WIRELESS_GEN2_BUTTONS);
|
|
265
|
+
const packet = new Array(names.length * BUTTON_FIELD_LENGTH).fill(0x00);
|
|
266
|
+
for (const [name, action] of Object.entries(mapping)) {
|
|
267
|
+
const { offset } = AEROX3_WIRELESS_GEN2_BUTTONS[name];
|
|
268
|
+
switch (action.type) {
|
|
269
|
+
case "button": {
|
|
270
|
+
if (!Object.hasOwn(AEROX3_WIRELESS_GEN2_BUTTONS, action.target)) {
|
|
271
|
+
throw new Aerox3WirelessGen2ProtocolError(`Unknown SteelSeries Aerox 3 Wireless Gen 2 button "${action.target}".`);
|
|
272
|
+
}
|
|
273
|
+
packet[offset] = AEROX3_WIRELESS_GEN2_BUTTONS[action.target].id;
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
case "disabled": {
|
|
277
|
+
packet[offset] = BUTTON_DISABLE;
|
|
278
|
+
break;
|
|
279
|
+
}
|
|
280
|
+
case "dpiSwitch": {
|
|
281
|
+
packet[offset] = BUTTON_DPI_SWITCH;
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
284
|
+
case "keyboard": {
|
|
285
|
+
packet[offset] = BUTTON_KEYBOARD;
|
|
286
|
+
packet[offset + 1] = encodeKeyCode(action.code, "Keyboard scan");
|
|
287
|
+
break;
|
|
288
|
+
}
|
|
289
|
+
case "multimedia": {
|
|
290
|
+
packet[offset] = BUTTON_MULTIMEDIA;
|
|
291
|
+
packet[offset + 1] = encodeKeyCode(action.code, "Multimedia key");
|
|
292
|
+
break;
|
|
293
|
+
}
|
|
294
|
+
default: {
|
|
295
|
+
throw new Aerox3WirelessGen2ProtocolError("Unsupported SteelSeries Aerox 3 Wireless Gen 2 button action.");
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return new Uint8Array([...frame(AEROX3_WIRELESS_GEN2_COMMAND.buttonsMapping, wireless), ...packet]);
|
|
300
|
+
}
|
|
301
|
+
//# sourceMappingURL=aerox-3-wireless-gen2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aerox-3-wireless-gen2.js","sourceRoot":"","sources":["../../src/steelseries/aerox-3-wireless-gen2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AAEH,MAAM,aAAa,GAAG,UAAU,CAAC;AAEjC,2FAA2F;AAC3F,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,UAAU,EAAE,CAAC,IAAI,CAAC;IAClB,WAAW,EAAE,CAAC,IAAI,CAAC;IACnB,cAAc,EAAE,CAAC,IAAI,CAAC;IACtB,YAAY,EAAE,CAAC,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;IACtB,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;CACV,CAAC;AAEX,MAAM,CAAC,MAAM,8BAA8B,GAAG,IAAI,CAAC;AAEnD;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAAC,OAA0B;IACpE,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,+BAA+B,CAAC,qDAAqD,CAAC,CAAC;IACnG,CAAC;IACD,OAAO,CAAC,OAAO,CAAC,CAAC,CAAE,GAAG,aAAa,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED,SAAS,KAAK,CAAC,OAA0B,EAAE,Q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,CAAC,sDAAsD,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC;gBACrH,CAAC;gBACD,MAAM,CAAC,MAAM,CAAC,GAAG,4BAA4B,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;gBAChE,MAAM;YACR,CAAC;YACD,KAAK,UAAU,CAAC,CAAC,CAAC;gBAChB,MAAM,CAAC,MAAM,CAAC,GAAG,cAAc,CAAC;gBAChC,MAAM;YACR,CAAC;YACD,KAAK,WAAW,CAAC,CAAC,CAAC;gBACjB,MAAM,CAAC,MAAM,CAAC,GAAG,iBAAiB,CAAC;gBACnC,MAAM;YACR,CAAC;YACD,KAAK,UAAU,CAAC,CAAC,CAAC;gBAChB,MAAM,CAAC,MAAM,CAAC,GAAG,eAAe,CAAC;gBACjC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;gBACjE,MAAM;YACR,CAAC;YACD,KAAK,YAAY,CAAC,CAAC,CAAC;gBAClB,MAAM,CAAC,MAAM,CAAC,GAAG,iBAAiB,CAAC;gBACnC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;gBAClE,MAAM;YACR,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;gBACR,MAAM,IAAI,+BAA+B,CAAC,+DAA+D,CAAC,CAAC;YAC7G,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,IAAI,UAAU,CAAC,CAAC,GAAG,KAAK,CAAC,4BAA4B,CAAC,cAAc,EAAE,QAAQ,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC;AACtG,CAAC"}
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
* two mainline device files. Per this rollout's instructions, rivalcfg's
|
|
42
42
|
* mainline file is treated as authoritative over the PR description, and
|
|
43
43
|
* because the DPI command genuinely differs, `1038:0x1870` is **not** added
|
|
44
|
-
* to this module's
|
|
45
|
-
*
|
|
46
|
-
*
|
|
44
|
+
* to this module's product table — it is registered under its own
|
|
45
|
+
* `"rival3-v2"` family instead (see `./rival-3-v2.ts`), which is also where
|
|
46
|
+
* its DPI encoder lives. Nothing in this file claims or matches that PID.
|
|
47
47
|
*
|
|
48
48
|
* Every command is an HID **output report** with report id 0x00 on the
|
|
49
49
|
* vendor configuration interface (hidapi `endpoint` / `interface_number ==
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
* two mainline device files. Per this rollout's instructions, rivalcfg's
|
|
42
42
|
* mainline file is treated as authoritative over the PR description, and
|
|
43
43
|
* because the DPI command genuinely differs, `1038:0x1870` is **not** added
|
|
44
|
-
* to this module's
|
|
45
|
-
*
|
|
46
|
-
*
|
|
44
|
+
* to this module's product table — it is registered under its own
|
|
45
|
+
* `"rival3-v2"` family instead (see `./rival-3-v2.ts`), which is also where
|
|
46
|
+
* its DPI encoder lives. Nothing in this file claims or matches that PID.
|
|
47
47
|
*
|
|
48
48
|
* Every command is an HID **output report** with report id 0x00 on the
|
|
49
49
|
* vendor configuration interface (hidapi `endpoint` / `interface_number ==
|
|
@@ -9,10 +9,18 @@
|
|
|
9
9
|
* codec branches on product id.
|
|
10
10
|
*
|
|
11
11
|
* Only PIDs whose protocol has been traced to a public implementation belong
|
|
12
|
-
* here. The Rival 3
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* here. The Rival 3 Gen 2 (`0x1870`) is deliberately absent: its command
|
|
13
|
+
* set is documented as different from every family below, and listing it
|
|
14
|
+
* would claim a device this codec would misprogram. The Rival 3 Wireless
|
|
15
|
+
* Gen 2 (`0x1872`) is present with family `"rival3-wireless-v2"` — its own
|
|
16
|
+
* module, `./rival-3-wireless-v2.ts`, with an XY DPI command and no
|
|
17
|
+
* lighting. The Rival 3 Wireless (`0x1830`) is present with family
|
|
18
|
+
* here. The Rival 3 Wireless Gen 2 (`0x1872`) is deliberately absent: its
|
|
19
|
+
* command set is documented as different from every family below, and
|
|
20
|
+
* listing it would claim a device this codec would misprogram. The Rival 3
|
|
21
|
+
* Gen 2 (`0x1870`) is present with family `"rival3-v2"` — its own module,
|
|
22
|
+
* `./rival-3-v2.ts`, with an XY DPI command no other family shares. The
|
|
23
|
+
* Rival 3 Wireless (`0x1830`) is present with family
|
|
16
24
|
* `"rival3-wireless"` — its own module, `./rival3-wireless.ts`, distinct from
|
|
17
25
|
* both Rival 3 Gen 1 and Aerox 3 (different command bytes throughout, a
|
|
18
26
|
* different DPI sensor table, and, unlike either wired family, a readable
|
|
@@ -21,9 +29,9 @@
|
|
|
21
29
|
* The Aerox 3 (`0x1836`, family `"aerox3"`) is a separate protocol family
|
|
22
30
|
* from Rival 3 despite both being SteelSeries, single-byte vs. two-byte
|
|
23
31
|
* command prefixes and all — see `./aerox3.ts`'s doc comment, including its
|
|
24
|
-
* reconciliation of PR flozz/rivalcfg#269's Rival 3 Gen 2 claim (
|
|
25
|
-
*
|
|
26
|
-
* commands match).
|
|
32
|
+
* reconciliation of PR flozz/rivalcfg#269's Rival 3 Gen 2 claim (shipped as
|
|
33
|
+
* its own `"rival3-v2"` family instead: its DPI command differs from
|
|
34
|
+
* Aerox 3's even though most other commands match).
|
|
27
35
|
*
|
|
28
36
|
* The Aerox 3 Wireless (`"aerox3-wireless"`, four PIDs across its USB-cabled
|
|
29
37
|
* and 2.4 GHz dongle modes, see `./aerox3-wireless.ts`) shares nothing with
|
|
@@ -50,20 +58,29 @@
|
|
|
50
58
|
* The Prime+ (`0x182C`, family `"prime-plus"`) is its own family per this
|
|
51
59
|
* rollout's per-cluster scoping, even though — see `./prime-plus.ts`'s doc
|
|
52
60
|
* comment for the full corroboration-gap disclosure — its rivalcfg profile
|
|
53
|
-
* (`prime_plus.py`) is byte-identical to plain Prime's (`prime.py
|
|
54
|
-
* `0x182E
|
|
55
|
-
*
|
|
61
|
+
* (`prime_plus.py`) is byte-identical to plain Prime's (`prime.py`). The
|
|
62
|
+
* plain Prime PIDs (`0x182E`, plus `0x182A`/`0x1856`) reuse this family's
|
|
63
|
+
* codec; no separate module exists.
|
|
56
64
|
*
|
|
57
65
|
* The Prime Mini Wireless (`"prime-mini-wireless"`, PIDs `0x184A` wired /
|
|
58
66
|
* `0x1848` 2.4 GHz — see `./prime-mini-wireless.ts`) is its own family for
|
|
59
67
|
* the same reason: rivalcfg documents it and the plain (non-Mini) Prime
|
|
60
68
|
* Wireless as one shared `settings` dict inside
|
|
61
|
-
* `prime_wireless_wired.py`/`prime_wireless_wireless.py
|
|
62
|
-
*
|
|
63
|
-
*
|
|
69
|
+
* `prime_wireless_wired.py`/`prime_wireless_wireless.py`. The plain Prime
|
|
70
|
+
* Wireless's PIDs (`0x1842` wired / `0x1840` 2.4 GHz) reuse this family's
|
|
71
|
+
* codec; no separate module exists.
|
|
72
|
+
*
|
|
73
|
+
* The Sensei Pro / Rival Pro (`"sensei-rival-pro"`, base station `0x1880` /
|
|
74
|
+
* dongle `0x1882` — see `./sensei-rival-pro.ts`) is its own family per the
|
|
75
|
+
* same rule: a distinct command set (raw-uint16 XY DPI with per-preset
|
|
76
|
+
* lift-off/landing, dual report/polling rates up to 8000 Hz) reconstructed
|
|
77
|
+
* from the vendor's own SteelSeries GG device specification rather than
|
|
78
|
+
* from rivalcfg, which does not cover these mice. The four models share one
|
|
79
|
+
* specification and report the model themselves; only the station and dongle
|
|
80
|
+
* USB product ids are registered.
|
|
64
81
|
*/
|
|
65
82
|
export declare const STEELSERIES_VENDOR_ID = 4152;
|
|
66
|
-
export type SteelSeriesProtocolFamily = "rival3" | "rival310" | "aerox3" | "aerox3-wireless" | "rival3-wireless" | "aerox5" | "aerox5-wireless" | "rival650" | "aerox9-wireless" | "prime-plus" | "prime-mini-wireless" | "sensei-ten";
|
|
83
|
+
export type SteelSeriesProtocolFamily = "rival3" | "rival3-v2" | "aerox3-wireless-gen2" | "rival-100" | "rival-110" | "rival-300" | "rival310" | "aerox3" | "aerox3-wireless" | "rival3-wireless" | "aerox5" | "aerox5-wireless" | "rival650" | "rival-600" | "aerox9-wireless" | "prime-plus" | "prime-mini-wireless" | "sensei-ten" | "sensei-rival-pro" | "sensei-310" | "prime-mini" | "rival-5" | "rival3-wireless-v2" | "sensei-raw";
|
|
67
84
|
export interface SteelSeriesProduct {
|
|
68
85
|
model: string;
|
|
69
86
|
/** Selects the codec module. Never infer one family's commands from another. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devices.d.ts","sourceRoot":"","sources":["../../src/steelseries/devices.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"devices.d.ts","sourceRoot":"","sources":["../../src/steelseries/devices.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFG;AAEH,eAAO,MAAM,qBAAqB,OAAS,CAAC;AAE5C,MAAM,MAAM,yBAAyB,GACjC,QAAQ,GACR,WAAW,GACX,sBAAsB,GACtB,WAAW,GACX,WAAW,GACX,WAAW,GACX,UAAU,GACV,QAAQ,GACR,iBAAiB,GACjB,iBAAiB,GACjB,QAAQ,GACR,iBAAiB,GACjB,UAAU,GACV,WAAW,GACX,iBAAiB,GACjB,YAAY,GACZ,qBAAqB,GACrB,YAAY,GACZ,kBAAkB,GAClB,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,oBAAoB,GACpB,YAAY,CAAC;AAEjB,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,MAAM,EAAE,yBAAyB,CAAC;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;;;OAOG;IACH,gBAAgB,EAAE,KAAK,CAAC;IACxB,6EAA6E;IAC7E,gBAAgB,EAAE,OAAO,CAAC;IAC1B,4EAA4E;IAC5E,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,MAAM,EAAE,kBAAkB,CA+pBvE,CAAC"}
|