@openmouse/protocol 0.28.0 → 0.30.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/asus/devices.d.ts +2 -4
- package/dist/asus/devices.d.ts.map +1 -1
- package/dist/asus/devices.js +2 -4
- package/dist/asus/devices.js.map +1 -1
- package/dist/asus/index.d.ts +4 -2
- package/dist/asus/index.d.ts.map +1 -1
- package/dist/asus/index.js +15 -7
- package/dist/asus/index.js.map +1 -1
- package/dist/asus/omni.d.ts +49 -0
- package/dist/asus/omni.d.ts.map +1 -0
- package/dist/asus/omni.js +95 -0
- package/dist/asus/omni.js.map +1 -0
- package/dist/corsair/bragi.d.ts +114 -0
- package/dist/corsair/bragi.d.ts.map +1 -0
- package/dist/corsair/bragi.js +150 -0
- package/dist/corsair/bragi.js.map +1 -0
- package/dist/corsair/index.d.ts +3 -0
- package/dist/corsair/index.d.ts.map +1 -1
- package/dist/corsair/index.js +3 -0
- package/dist/corsair/index.js.map +1 -1
- package/dist/drivers/asus/hid.d.ts +22 -2
- package/dist/drivers/asus/hid.d.ts.map +1 -1
- package/dist/drivers/asus/hid.js +139 -24
- package/dist/drivers/asus/hid.js.map +1 -1
- package/dist/drivers/corsair/bragi-hid.d.ts +42 -0
- package/dist/drivers/corsair/bragi-hid.d.ts.map +1 -0
- package/dist/drivers/corsair/bragi-hid.js +192 -0
- package/dist/drivers/corsair/bragi-hid.js.map +1 -0
- package/dist/drivers/glorious/core2-hid.d.ts +56 -0
- package/dist/drivers/glorious/core2-hid.d.ts.map +1 -0
- package/dist/drivers/glorious/core2-hid.js +344 -0
- package/dist/drivers/glorious/core2-hid.js.map +1 -0
- package/dist/drivers/lamzu-atlantis/hid.d.ts +10 -1
- package/dist/drivers/lamzu-atlantis/hid.d.ts.map +1 -1
- package/dist/drivers/lamzu-atlantis/hid.js +104 -39
- package/dist/drivers/lamzu-atlantis/hid.js.map +1 -1
- package/dist/drivers/logitech/hidpp.d.ts.map +1 -1
- package/dist/drivers/logitech/hidpp.js +6 -2
- package/dist/drivers/logitech/hidpp.js.map +1 -1
- package/dist/drivers/logitech/mode-status.d.ts +9 -0
- package/dist/drivers/logitech/mode-status.d.ts.map +1 -1
- package/dist/drivers/logitech/mode-status.js +11 -0
- package/dist/drivers/logitech/mode-status.js.map +1 -1
- package/dist/drivers/mouse-types.d.ts +12 -1
- package/dist/drivers/mouse-types.d.ts.map +1 -1
- package/dist/drivers/noir/m1-nex-hid.d.ts +17 -0
- package/dist/drivers/noir/m1-nex-hid.d.ts.map +1 -0
- package/dist/drivers/noir/m1-nex-hid.js +49 -0
- package/dist/drivers/noir/m1-nex-hid.js.map +1 -0
- package/dist/drivers/pulsar/pulsar-hid.d.ts.map +1 -1
- package/dist/drivers/pulsar/pulsar-hid.js +1 -0
- package/dist/drivers/pulsar/pulsar-hid.js.map +1 -1
- package/dist/drivers/pulsar/pulsar-xs1-hid.d.ts.map +1 -1
- package/dist/drivers/pulsar/pulsar-xs1-hid.js +23 -10
- package/dist/drivers/pulsar/pulsar-xs1-hid.js.map +1 -1
- package/dist/drivers/razer/hid.d.ts +6 -0
- package/dist/drivers/razer/hid.d.ts.map +1 -1
- package/dist/drivers/razer/hid.js +63 -2
- package/dist/drivers/razer/hid.js.map +1 -1
- package/dist/drivers/registry.d.ts +3 -1
- package/dist/drivers/registry.d.ts.map +1 -1
- package/dist/drivers/registry.js +7 -0
- package/dist/drivers/registry.js.map +1 -1
- package/dist/drivers/vendors.d.ts +17 -1
- package/dist/drivers/vendors.d.ts.map +1 -1
- package/dist/drivers/vendors.js +39 -11
- package/dist/drivers/vendors.js.map +1 -1
- package/dist/glorious-core2/index.d.ts +174 -0
- package/dist/glorious-core2/index.d.ts.map +1 -0
- package/dist/glorious-core2/index.js +266 -0
- package/dist/glorious-core2/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lamzu/atlantis.d.ts +17 -0
- package/dist/lamzu/atlantis.d.ts.map +1 -1
- package/dist/lamzu/atlantis.js.map +1 -1
- package/dist/razer/codec.d.ts +9 -0
- package/dist/razer/codec.d.ts.map +1 -1
- package/dist/razer/codec.js +25 -0
- package/dist/razer/codec.js.map +1 -1
- package/dist/razer/devices.d.ts +2 -0
- package/dist/razer/devices.d.ts.map +1 -1
- package/dist/razer/devices.js +1 -1
- package/dist/razer/devices.js.map +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { CORSAIR_BRAGI_MICE, CORSAIR_BRAGI_MODE, CORSAIR_BRAGI_PROPERTY, CORSAIR_BRAGI_RECEIVERS, CORSAIR_BRAGI_USAGE_PAGE, CORSAIR_VENDOR_ID, corsairBragiDecode, corsairBragiEncode, corsairBragiIsReplyTo, corsairBragiStatusText, } from "@openmouse/protocol/corsair";
|
|
2
|
+
/** ckb-next waits 2 s and OpenLinkHub 1 s; iCUE's acks came back within 10 ms through the receiver. */
|
|
3
|
+
const REPLY_TIMEOUT_MS = 1000;
|
|
4
|
+
const REPLY_POLL_MS = 5;
|
|
5
|
+
const SUPPORTED_POLLING_RATES = [125, 250, 500, 1000];
|
|
6
|
+
/**
|
|
7
|
+
* Corsair Bragi mice (IRONCLAW RGB WIRELESS) over the cable or a SLIPSTREAM
|
|
8
|
+
* receiver. Read-only on purpose: iCUE's DPI writes are decoded and encoded
|
|
9
|
+
* in the codec, but they were captured with iCUE driving the mouse (software
|
|
10
|
+
* mode), and nothing shows yet whether the live-DPI property reads back or
|
|
11
|
+
* sticks in hardware mode with iCUE closed. ckb-next flips to software mode
|
|
12
|
+
* before reading; this driver never changes the mode, because a mouse left in
|
|
13
|
+
* software mode stops applying its onboard settings until something flips it
|
|
14
|
+
* back.
|
|
15
|
+
*
|
|
16
|
+
* A request is one 64-byte output report; its answer is the next input report
|
|
17
|
+
* on the same interface with the same slot and command. Replies do not echo
|
|
18
|
+
* the property, so all traffic goes through one queue. Windows hands every
|
|
19
|
+
* open handle a copy of each input report, so a GET iCUE sends at the same
|
|
20
|
+
* moment can answer ours: close iCUE for trustworthy values.
|
|
21
|
+
*/
|
|
22
|
+
export class CorsairBragiHidClient {
|
|
23
|
+
device;
|
|
24
|
+
queue = Promise.resolve();
|
|
25
|
+
inbox = [];
|
|
26
|
+
onReport = null;
|
|
27
|
+
constructor(device) {
|
|
28
|
+
this.device = device;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Corsair VID, a known Bragi mouse or receiver, and the 0xFF42 collection
|
|
32
|
+
* that takes output reports. The receiver's interface 2 is also 0xFF42 but
|
|
33
|
+
* input-only (button and connection notifications), so it is not claimed.
|
|
34
|
+
*/
|
|
35
|
+
static isSupported(device) {
|
|
36
|
+
if (device.vendorId !== CORSAIR_VENDOR_ID)
|
|
37
|
+
return false;
|
|
38
|
+
if (!CORSAIR_BRAGI_MICE.has(device.productId) && !CORSAIR_BRAGI_RECEIVERS.has(device.productId))
|
|
39
|
+
return false;
|
|
40
|
+
return hasCommandCollection(device.collections);
|
|
41
|
+
}
|
|
42
|
+
get pollIntervalMs() { return 30_000; }
|
|
43
|
+
getDpiOptions() { return []; }
|
|
44
|
+
async open() {
|
|
45
|
+
if (!this.device.opened)
|
|
46
|
+
await this.device.open();
|
|
47
|
+
if (!this.onReport) {
|
|
48
|
+
this.onReport = (event) => {
|
|
49
|
+
this.inbox.push(new Uint8Array(event.data.buffer, event.data.byteOffset, event.data.byteLength));
|
|
50
|
+
};
|
|
51
|
+
this.device.addEventListener("inputreport", this.onReport);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
async close() {
|
|
55
|
+
if (this.onReport) {
|
|
56
|
+
this.device.removeEventListener("inputreport", this.onReport);
|
|
57
|
+
this.onReport = null;
|
|
58
|
+
}
|
|
59
|
+
this.inbox = [];
|
|
60
|
+
if (this.device.opened)
|
|
61
|
+
await this.device.close();
|
|
62
|
+
}
|
|
63
|
+
async readStatus() {
|
|
64
|
+
return await this.run(async () => {
|
|
65
|
+
await this.open();
|
|
66
|
+
return await this.readStatusDirect();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
async readStatusDirect() {
|
|
70
|
+
const receiver = CORSAIR_BRAGI_RECEIVERS.get(this.device.productId);
|
|
71
|
+
let slot = 0;
|
|
72
|
+
if (receiver) {
|
|
73
|
+
const connected = await this.value(0, CORSAIR_BRAGI_PROPERTY.slots).then((bits) => bits === null ? null : corsairBragiDecode.slots(bits));
|
|
74
|
+
const picked = pickSlot(connected);
|
|
75
|
+
if (picked === null) {
|
|
76
|
+
return identityOnly(receiver, "The receiver answered, but no mouse is connected to it. Wake the mouse (move it or click), then add it again.");
|
|
77
|
+
}
|
|
78
|
+
slot = picked;
|
|
79
|
+
}
|
|
80
|
+
const productId = await this.value(slot, CORSAIR_BRAGI_PROPERTY.productId);
|
|
81
|
+
const mouse = CORSAIR_BRAGI_MICE.get(productId ?? this.device.productId);
|
|
82
|
+
const name = mouse?.name ?? (productId === null ? receiver ?? "Corsair mouse" : `mouse 0x${hex(productId, 4)}`);
|
|
83
|
+
const firmware = await this.get(slot, CORSAIR_BRAGI_PROPERTY.firmware).then(corsairBragiDecode.firmware, () => null);
|
|
84
|
+
const mode = await this.value(slot, CORSAIR_BRAGI_PROPERTY.mode);
|
|
85
|
+
const polling = await this.value(slot, CORSAIR_BRAGI_PROPERTY.pollingRate);
|
|
86
|
+
const level = await this.value(slot, CORSAIR_BRAGI_PROPERTY.batteryLevel);
|
|
87
|
+
const charge = await this.value(slot, CORSAIR_BRAGI_PROPERTY.batteryStatus);
|
|
88
|
+
const dpiX = await this.value(slot, CORSAIR_BRAGI_PROPERTY.dpiX);
|
|
89
|
+
// A mouse that ignores X will not answer Y either; skip the second timeout.
|
|
90
|
+
const dpiY = dpiX === null ? null : await this.value(slot, CORSAIR_BRAGI_PROPERTY.dpiY);
|
|
91
|
+
const software = mode === CORSAIR_BRAGI_MODE.software;
|
|
92
|
+
const lines = [
|
|
93
|
+
firmware ? `Firmware ${firmware}` : null,
|
|
94
|
+
mode === null ? null : `Mode: ${software ? "software (iCUE is driving the mouse)" : mode === CORSAIR_BRAGI_MODE.hardware ? "hardware (onboard settings)" : `unknown (${mode})`}`,
|
|
95
|
+
productId === null ? null : `Product id 0x${hex(productId, 4)}${receiver ? ` in receiver slot ${slot}` : ""}`,
|
|
96
|
+
].filter((line) => line !== null);
|
|
97
|
+
return {
|
|
98
|
+
brand: "Corsair",
|
|
99
|
+
name,
|
|
100
|
+
batteryPercent: level === null ? null : corsairBragiDecode.batteryPercent(level),
|
|
101
|
+
batteryState: charge === null ? "Unknown" : corsairBragiDecode.batteryState(charge),
|
|
102
|
+
dpi: dpiX ?? 0,
|
|
103
|
+
dpiY: dpiY ?? dpiX ?? 0,
|
|
104
|
+
supportsSeparateDpiAxes: true,
|
|
105
|
+
pollingRateHz: polling === null ? 0 : corsairBragiDecode.pollingRateHz(polling) ?? 0,
|
|
106
|
+
supportedPollingRates: [...SUPPORTED_POLLING_RATES],
|
|
107
|
+
activeProfile: null,
|
|
108
|
+
deviceMode: mode === CORSAIR_BRAGI_MODE.hardware ? "Onboard" : software ? "Host" : "Unknown",
|
|
109
|
+
connectionType: receiver ? "Wireless" : "Wired",
|
|
110
|
+
connectionDetail: receiver ?? "USB",
|
|
111
|
+
liftOffDistance: null,
|
|
112
|
+
firmware: lines,
|
|
113
|
+
ui: {
|
|
114
|
+
family: "corsair-bragi",
|
|
115
|
+
settingsReady: false,
|
|
116
|
+
valuesVerified: dpiX !== null,
|
|
117
|
+
defaultDisplayName: `Corsair ${name}`,
|
|
118
|
+
statusNote: dpiX === null
|
|
119
|
+
? "Identified the mouse, but it did not answer the DPI read. Close iCUE, reconnect the mouse, and add it again."
|
|
120
|
+
: software
|
|
121
|
+
? "Read-only for now. iCUE has the mouse in software mode, so these are iCUE's values."
|
|
122
|
+
: "Read-only for now: DPI, polling rate and battery are read from the mouse but cannot be changed here yet.",
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/** A property's value, or null when the mouse refuses it or stays silent. */
|
|
127
|
+
async value(slot, property) {
|
|
128
|
+
return await this.get(slot, property).then((reply) => corsairBragiDecode.reply(reply).value, () => null);
|
|
129
|
+
}
|
|
130
|
+
/** One GET: send, then wait for the matching reply. Throws on a non-zero status or a timeout. */
|
|
131
|
+
async get(slot, property) {
|
|
132
|
+
const request = corsairBragiEncode.get(slot, property);
|
|
133
|
+
this.inbox = [];
|
|
134
|
+
await this.device.sendReport(0, request.buffer);
|
|
135
|
+
const deadline = Date.now() + REPLY_TIMEOUT_MS;
|
|
136
|
+
while (Date.now() < deadline) {
|
|
137
|
+
const reply = this.inbox.find((candidate) => corsairBragiIsReplyTo(request, candidate));
|
|
138
|
+
if (reply) {
|
|
139
|
+
const { status } = corsairBragiDecode.reply(reply);
|
|
140
|
+
if (status !== 0)
|
|
141
|
+
throw new Error(`Corsair property 0x${hex(property, 2)}: ${corsairBragiStatusText(status)}.`);
|
|
142
|
+
return reply;
|
|
143
|
+
}
|
|
144
|
+
await delay(REPLY_POLL_MS);
|
|
145
|
+
}
|
|
146
|
+
throw new Error(`The Corsair mouse did not answer property 0x${hex(property, 2)}.`);
|
|
147
|
+
}
|
|
148
|
+
async run(operation) {
|
|
149
|
+
const result = this.queue.then(operation, operation);
|
|
150
|
+
this.queue = result.then(() => undefined, () => undefined);
|
|
151
|
+
return await result;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Which receiver slot to talk to. `connected` lists the slots the receiver
|
|
156
|
+
* reports as connected, ascending, or is null when that read failed; a failed
|
|
157
|
+
* read falls back to slot 1, the one iCUE used, in case this receiver does not
|
|
158
|
+
* answer 0x36 at all. Null means no mouse to talk to.
|
|
159
|
+
*/
|
|
160
|
+
function pickSlot(connected) {
|
|
161
|
+
// ponytail: lowest connected slot; read 0x12 per slot if a keyboard ever shares the receiver.
|
|
162
|
+
if (connected === null)
|
|
163
|
+
return 1;
|
|
164
|
+
return connected[0] ?? null;
|
|
165
|
+
}
|
|
166
|
+
function identityOnly(name, note) {
|
|
167
|
+
return {
|
|
168
|
+
brand: "Corsair",
|
|
169
|
+
name,
|
|
170
|
+
batteryPercent: null,
|
|
171
|
+
batteryState: "Unknown",
|
|
172
|
+
dpi: 0,
|
|
173
|
+
pollingRateHz: 0,
|
|
174
|
+
activeProfile: null,
|
|
175
|
+
connectionType: "Wireless",
|
|
176
|
+
connectionDetail: name,
|
|
177
|
+
liftOffDistance: null,
|
|
178
|
+
firmware: [],
|
|
179
|
+
ui: { family: "corsair-bragi", settingsReady: false, valuesVerified: false, defaultDisplayName: `Corsair ${name}`, statusNote: note },
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
function hasCommandCollection(collections) {
|
|
183
|
+
return collections.some((collection) => (collection.usagePage === CORSAIR_BRAGI_USAGE_PAGE && collection.outputReports.length > 0)
|
|
184
|
+
|| hasCommandCollection(collection.children));
|
|
185
|
+
}
|
|
186
|
+
function hex(value, digits) {
|
|
187
|
+
return value.toString(16).padStart(digits, "0");
|
|
188
|
+
}
|
|
189
|
+
function delay(ms) {
|
|
190
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
191
|
+
}
|
|
192
|
+
//# sourceMappingURL=bragi-hid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bragi-hid.js","sourceRoot":"","sources":["../../../src/drivers/corsair/bragi-hid.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AAErC,uGAAuG;AACvG,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,uBAAuB,GAAG,CAAC,G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
|
|
4
|
+
readonly device: HIDDevice;
|
|
5
|
+
/** Calls run one at a time: a read is a SET followed by a GET and must not interleave with another. */
|
|
6
|
+
private queue;
|
|
7
|
+
constructor(device: HIDDevice);
|
|
8
|
+
static isSupported(device: HIDDevice): boolean;
|
|
9
|
+
/** The config channel is an unnumbered feature report on usage page 0xffff; the 0xffff decoy on interface 1 has none. */
|
|
10
|
+
private static hasConfigReport;
|
|
11
|
+
open(): Promise<void>;
|
|
12
|
+
close(): Promise<void>;
|
|
13
|
+
isWireless(): boolean;
|
|
14
|
+
displayName(): string;
|
|
15
|
+
getDpiOptions(): number[];
|
|
16
|
+
getDebounceOptions(): number[];
|
|
17
|
+
/** 8000 Hz needs the cable; the receiver stops at 4000 Hz. */
|
|
18
|
+
getSupportedPollingRates(): number[];
|
|
19
|
+
readStatus(): Promise<MouseStatus>;
|
|
20
|
+
/** Changes the DPI of the active stage. */
|
|
21
|
+
setDpi(dpi: number): Promise<number>;
|
|
22
|
+
/** Writes the whole stage table, so every stage comes from the values shown, then re-selects the active stage. */
|
|
23
|
+
setDpiStageValue(stage: number, dpi: number): Promise<number>;
|
|
24
|
+
/** New stages start at newStageDpi() with the next color of CORE's palette; the active stage moves down when its slot disappears. */
|
|
25
|
+
setDpiStageCount(count: number): Promise<number>;
|
|
26
|
+
setActiveDpiStage(stage: number): Promise<number>;
|
|
27
|
+
setDpiStageColor(stage: number, color: string): Promise<string>;
|
|
28
|
+
/**
|
|
29
|
+
* One rate for both links, as CORE sends it. The cable's 8000 Hz pairs with
|
|
30
|
+
* 4000 Hz for the receiver, the most CORE allows there.
|
|
31
|
+
*/
|
|
32
|
+
setPollingRate(pollingRateHz: number): Promise<number>;
|
|
33
|
+
/** Simple debounce: also clears the advanced press and release times, as CORE does when its advanced switch is off. */
|
|
34
|
+
setDebounceTime(milliseconds: number): Promise<number>;
|
|
35
|
+
setMotionSync(enabled: boolean): Promise<boolean>;
|
|
36
|
+
/** Selects the profile on the mouse; from then on writes go to it. 1-based, as in the shell. */
|
|
37
|
+
setProfile(profile: number): Promise<number>;
|
|
38
|
+
private assertStage;
|
|
39
|
+
private writeStages;
|
|
40
|
+
/** Sends frames in order, each followed by its own pause. */
|
|
41
|
+
private write;
|
|
42
|
+
private run;
|
|
43
|
+
private send;
|
|
44
|
+
/** The reply to the request just sent. WebHID hands back the 64-byte body without the report id. */
|
|
45
|
+
private receive;
|
|
46
|
+
private readFirmware;
|
|
47
|
+
private readBattery;
|
|
48
|
+
private getUiHints;
|
|
49
|
+
/** One key per model, not per product id: the cable and the receiver reach the same mouse and the same profiles. */
|
|
50
|
+
private storageKey;
|
|
51
|
+
private loadProfile;
|
|
52
|
+
private saveProfile;
|
|
53
|
+
private loadState;
|
|
54
|
+
private saveState;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=core2-hid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core2-hid.d.ts","sourceRoot":"","sources":["../../../src/drivers/glorious/core2-hid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAwGnE,qBAAa,sBAAsB;IACjC,IAAI,cAAc,IAAI,MAAM,CAAmB;IAC/C,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,uGAAuG;IACvG,OAAO,CAAC,KAAK,CAAuC;gBAExC,MAAM,EAAE,SAAS;IAI7B,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO;IAM9C,yHAAyH;IACzH,OAAO,CAAC,MAAM,CAAC,eAAe;IAOxB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,UAAU,IAAI,OAAO;IAIrB,WAAW,IAAI,MAAM;IAIrB,aAAa,IAAI,MAAM,EAAE;IAMzB,kBAAkB,IAAI,MAAM,EAAE;IAM9B,8DAA8D;IAC9D,wBAAwB,IAAI,MAAM,E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S_CORE2_DEBOUNCE_MAX_MS, GLORIOUS_CORE2_DEBOUNCE_MIN_MS, GLORIOUS_CORE2_DEBOUNCE_STEP_MS, GLORIOUS_CORE2_DPI_MAX, GLORIOUS_CORE2_DPI_MIN, GLORIOUS_CORE2_DPI_STEP, GLORIOUS_CORE2_FRAME_LENGTH, GLORIOUS_CORE2_MAX_DPI_STAGES, GLORIOUS_CORE2_POLLING_CODES, GLORIOUS_CORE2_PRODUCTS, GLORIOUS_CORE2_PROFILE_COUNT, GLORIOUS_CORE2_PROFILE_DEFAULT, GLORIOUS_CORE2_REPORT_ID, GLORIOUS_CORE2_USAGE_PAGE, GLORIOUS_CORE2_VENDOR_ID, GLORIOUS_CORE2_WIRELESS_MAX_POLLING_HZ, decodeGloriousCore2Battery, decodeGloriousCore2Firmware, encodeGloriousCore2ActiveDpiStage, encodeGloriousCore2BatteryRequest, encodeGloriousCore2Debounce, encodeGloriousCore2DpiColors, encodeGloriousCore2DpiStages, encodeGloriousCore2FirmwareRequest, encodeGloriousCore2MotionSync, encodeGloriousCore2PollingRate, encodeGloriousCore2Profile, } from "../../glorious-core2/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Driver for the Glorious Model O 2 PRO 4K/8K, wired (0x258a:0x201b) and
|
|
4
|
+
* through its 2.4 GHz receiver (0x2035). Frames follow Glorious CORE's own
|
|
5
|
+
* traffic and code, see ../../glorious-core2/index.ts and
|
|
6
|
+
* captures/glorious-o2-pro-4k8k-wired/.
|
|
7
|
+
*
|
|
8
|
+
* Only the firmware and battery are readable: CORE never reads a setting back,
|
|
9
|
+
* and no read command for DPI stages, colors, polling rate, debounce, motion
|
|
10
|
+
* sync or the active profile is known. Like the sibling classic driver, this
|
|
11
|
+
* client keeps its own last-written values (localStorage, one set per profile)
|
|
12
|
+
* for the UI to show and reports `valuesVerified: false`.
|
|
13
|
+
*
|
|
14
|
+
* Every setting belongs to one of three onboard profiles and is written with
|
|
15
|
+
* that profile's number. The mouse cannot say which profile is active, so the
|
|
16
|
+
* client assumes profile 1 until the user picks one; picking sends CORE's own
|
|
17
|
+
* profile-select frame, after which writes land in the profile in use.
|
|
18
|
+
*
|
|
19
|
+
* Not offered, for want of evidence: lift-off distance (CORE writes the same
|
|
20
|
+
* value for both of its options), auto sleep, lighting, buttons and macros,
|
|
21
|
+
* and the advanced debounce times.
|
|
22
|
+
*/
|
|
23
|
+
/** The mouse answers a request after about 60 ms in the capture. */
|
|
24
|
+
const REPLY_DELAY_MS = 60;
|
|
25
|
+
/** CORE waits this long after each frame, and longer after the active DPI stage. */
|
|
26
|
+
const FRAME_GAP_MS = 30;
|
|
27
|
+
const ACTIVE_STAGE_GAP_MS = 120;
|
|
28
|
+
const PROFILE_SWITCH_GAP_MS = 50;
|
|
29
|
+
const FACTORY_STAGE_DPIS = [400, 800, 1600, 3200];
|
|
30
|
+
/** CORE's stage colors in the order it hands them out: orange, light blue, red, green, then purple and cyan. */
|
|
31
|
+
const STAGE_COLORS = ["#ffa40d", "#26b4ff", "#ff2626", "#18b30a", "#5500ff", "#00ffff"];
|
|
32
|
+
const FACTORY_STAGE_COLORS = STAGE_COLORS.slice(0, FACTORY_STAGE_DPIS.length);
|
|
33
|
+
/** The factory default level is 1600 DPI, the third stage. */
|
|
34
|
+
const FACTORY_ACTIVE_STAGE = 2;
|
|
35
|
+
const FACTORY_POLLING_HZ = 1000;
|
|
36
|
+
function factoryState() {
|
|
37
|
+
return {
|
|
38
|
+
stageDpis: [...FACTORY_STAGE_DPIS],
|
|
39
|
+
stageColors: [...FACTORY_STAGE_COLORS],
|
|
40
|
+
activeStage: FACTORY_ACTIVE_STAGE,
|
|
41
|
+
pollingRateHz: FACTORY_POLLING_HZ,
|
|
42
|
+
debounceMs: GLORIOUS_CORE2_DEBOUNCE_DEFAULT_MS,
|
|
43
|
+
motionSync: true,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
const delay = (milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds));
|
|
47
|
+
/**
|
|
48
|
+
* The DPI a stage added by raising the stage count starts at, given the stages
|
|
49
|
+
* already there (never empty): double the last one, capped at the maximum.
|
|
50
|
+
* That continues 400, 800, 1600, 3200 with 6400 and 12800, which are CORE's own
|
|
51
|
+
* defaults for stages 5 and 6 on the newer Glorious mice. Doubling a multiple of
|
|
52
|
+
* the 50 DPI step stays on the step, and the cap does too.
|
|
53
|
+
*/
|
|
54
|
+
function newStageDpi(existing) {
|
|
55
|
+
return Math.min(existing.at(-1) * 2, GLORIOUS_CORE2_DPI_MAX);
|
|
56
|
+
}
|
|
57
|
+
export class GloriousCore2HidClient {
|
|
58
|
+
get pollIntervalMs() { return 30_000; }
|
|
59
|
+
device;
|
|
60
|
+
/** Calls run one at a time: a read is a SET followed by a GET and must not interleave with another. */
|
|
61
|
+
queue = Promise.resolve();
|
|
62
|
+
constructor(device) {
|
|
63
|
+
this.device = device;
|
|
64
|
+
}
|
|
65
|
+
static isSupported(device) {
|
|
66
|
+
return device.vendorId === GLORIOUS_CORE2_VENDOR_ID
|
|
67
|
+
&& GLORIOUS_CORE2_PRODUCTS.has(device.productId)
|
|
68
|
+
&& GloriousCore2HidClient.hasConfigReport(device.collections);
|
|
69
|
+
}
|
|
70
|
+
/** The config channel is an unnumbered feature report on usage page 0xffff; the 0xffff decoy on interface 1 has none. */
|
|
71
|
+
static hasConfigReport(collections) {
|
|
72
|
+
return collections.some((collection) => (collection.usagePage === GLORIOUS_CORE2_USAGE_PAGE
|
|
73
|
+
&& collection.featureReports.some((report) => report.reportId === GLORIOUS_CORE2_REPORT_ID))
|
|
74
|
+
|| GloriousCore2HidClient.hasConfigReport(collection.children));
|
|
75
|
+
}
|
|
76
|
+
async open() {
|
|
77
|
+
if (!this.device.opened)
|
|
78
|
+
await this.device.open();
|
|
79
|
+
}
|
|
80
|
+
async close() {
|
|
81
|
+
if (this.device.opened)
|
|
82
|
+
await this.device.close();
|
|
83
|
+
}
|
|
84
|
+
isWireless() {
|
|
85
|
+
return GLORIOUS_CORE2_PRODUCTS.get(this.device.productId)?.wireless ?? false;
|
|
86
|
+
}
|
|
87
|
+
displayName() {
|
|
88
|
+
return this.device.productName || GLORIOUS_CORE2_PRODUCTS.get(this.device.productId)?.name || "Glorious Model O2 Pro 4K/8K";
|
|
89
|
+
}
|
|
90
|
+
getDpiOptions() {
|
|
91
|
+
const options = [];
|
|
92
|
+
for (let dpi = GLORIOUS_CORE2_DPI_MIN; dpi <= GLORIOUS_CORE2_DPI_MAX; dpi += GLORIOUS_CORE2_DPI_STEP)
|
|
93
|
+
options.push(dpi);
|
|
94
|
+
return options;
|
|
95
|
+
}
|
|
96
|
+
getDebounceOptions() {
|
|
97
|
+
const options = [];
|
|
98
|
+
for (let ms = GLORIOUS_CORE2_DEBOUNCE_MIN_MS; ms <= GLORIOUS_CORE2_DEBOUNCE_MAX_MS; ms += GLORIOUS_CORE2_DEBOUNCE_STEP_MS)
|
|
99
|
+
options.push(ms);
|
|
100
|
+
return options;
|
|
101
|
+
}
|
|
102
|
+
/** 8000 Hz needs the cable; the receiver stops at 4000 Hz. */
|
|
103
|
+
getSupportedPollingRates() {
|
|
104
|
+
return GLORIOUS_CORE2_POLLING_CODES
|
|
105
|
+
.map(([hertz]) => hertz)
|
|
106
|
+
.filter((hertz) => !this.isWireless() || hertz <= GLORIOUS_CORE2_WIRELESS_MAX_POLLING_HZ);
|
|
107
|
+
}
|
|
108
|
+
async readStatus() {
|
|
109
|
+
await this.open();
|
|
110
|
+
const { firmware, battery } = await this.run(async () => ({
|
|
111
|
+
firmware: await this.readFirmware().catch(() => null),
|
|
112
|
+
battery: await this.readBattery().catch(() => null),
|
|
113
|
+
}));
|
|
114
|
+
const profile = this.loadProfile();
|
|
115
|
+
const state = this.loadState(profile);
|
|
116
|
+
const wireless = this.isWireless();
|
|
117
|
+
return {
|
|
118
|
+
brand: "Glorious",
|
|
119
|
+
name: this.displayName(),
|
|
120
|
+
ui: this.getUiHints(),
|
|
121
|
+
batteryPercent: battery?.percent ?? null,
|
|
122
|
+
batteryState: !battery ? "Unknown" : battery.charging ? "Charging" : battery.percent === 100 ? "Full" : "Discharging",
|
|
123
|
+
dpi: state.stageDpis[state.activeStage] ?? state.stageDpis[0],
|
|
124
|
+
dpiStages: state.stageDpis,
|
|
125
|
+
dpiStageColors: state.stageColors,
|
|
126
|
+
activeDpiStage: state.activeStage,
|
|
127
|
+
// A rate remembered from the cable can be 8000 Hz, which the receiver does not offer.
|
|
128
|
+
pollingRateHz: wireless ? Math.min(state.pollingRateHz, GLORIOUS_CORE2_WIRELESS_MAX_POLLING_HZ) : state.pollingRateHz,
|
|
129
|
+
supportedPollingRates: this.getSupportedPollingRates(),
|
|
130
|
+
debounceMs: state.debounceMs,
|
|
131
|
+
motionSync: state.motionSync,
|
|
132
|
+
profileCount: GLORIOUS_CORE2_PROFILE_COUNT,
|
|
133
|
+
activeProfile: profile,
|
|
134
|
+
connectionType: wireless ? "Wireless" : "Wired",
|
|
135
|
+
connectionDetail: wireless ? "2.4 GHz receiver, up to 4000 Hz" : "USB cable, up to 8000 Hz",
|
|
136
|
+
liftOffDistance: null,
|
|
137
|
+
firmware: firmware ? [wireless ? `Receiver ${firmware.version}` : firmware.version] : [],
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/** Changes the DPI of the active stage. */
|
|
141
|
+
async setDpi(dpi) {
|
|
142
|
+
return this.setDpiStageValue(this.loadState(this.loadProfile()).activeStage, dpi);
|
|
143
|
+
}
|
|
144
|
+
/** Writes the whole stage table, so every stage comes from the values shown, then re-selects the active stage. */
|
|
145
|
+
async setDpiStageValue(stage, dpi) {
|
|
146
|
+
const profile = this.loadProfile();
|
|
147
|
+
const state = this.loadState(profile);
|
|
148
|
+
this.assertStage(stage, state.stageDpis.length);
|
|
149
|
+
const stageDpis = state.stageDpis.map((value, index) => (index === stage ? dpi : value));
|
|
150
|
+
await this.writeStages(profile, stageDpis, state.activeStage);
|
|
151
|
+
this.saveState(profile, { ...state, stageDpis });
|
|
152
|
+
return dpi;
|
|
153
|
+
}
|
|
154
|
+
/** New stages start at newStageDpi() with the next color of CORE's palette; the active stage moves down when its slot disappears. */
|
|
155
|
+
async setDpiStageCount(count) {
|
|
156
|
+
if (!Number.isInteger(count) || count < 1 || count > GLORIOUS_CORE2_MAX_DPI_STAGES) {
|
|
157
|
+
throw new Error(`This mouse has 1 to ${GLORIOUS_CORE2_MAX_DPI_STAGES} DPI stages.`);
|
|
158
|
+
}
|
|
159
|
+
const profile = this.loadProfile();
|
|
160
|
+
const state = this.loadState(profile);
|
|
161
|
+
const stageDpis = state.stageDpis.slice(0, count);
|
|
162
|
+
while (stageDpis.length < count)
|
|
163
|
+
stageDpis.push(newStageDpi(stageDpis));
|
|
164
|
+
const stageColors = Array.from({ length: count }, (_, index) => state.stageColors[index] ?? STAGE_COLORS[index]);
|
|
165
|
+
const activeStage = Math.min(state.activeStage, count - 1);
|
|
166
|
+
await this.writeStages(profile, stageDpis, activeStage, stageColors);
|
|
167
|
+
this.saveState(profile, { ...state, stageDpis, stageColors, activeStage });
|
|
168
|
+
return count;
|
|
169
|
+
}
|
|
170
|
+
async setActiveDpiStage(stage) {
|
|
171
|
+
const profile = this.loadProfile();
|
|
172
|
+
const state = this.loadState(profile);
|
|
173
|
+
this.assertStage(stage, state.stageDpis.length);
|
|
174
|
+
await this.write([[encodeGloriousCore2ActiveDpiStage(stage, profile), ACTIVE_STAGE_GAP_MS]]);
|
|
175
|
+
this.saveState(profile, { ...state, activeStage: stage });
|
|
176
|
+
return stage;
|
|
177
|
+
}
|
|
178
|
+
async setDpiStageColor(stage, color) {
|
|
179
|
+
const profile = this.loadProfile();
|
|
180
|
+
const state = this.loadState(profile);
|
|
181
|
+
this.assertStage(stage, state.stageDpis.length);
|
|
182
|
+
const stageColors = state.stageColors.map((value, index) => (index === stage ? color.toLowerCase() : value));
|
|
183
|
+
await this.write([[encodeGloriousCore2DpiColors(stageColors, profile), FRAME_GAP_MS]]);
|
|
184
|
+
this.saveState(profile, { ...state, stageColors });
|
|
185
|
+
return color;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* One rate for both links, as CORE sends it. The cable's 8000 Hz pairs with
|
|
189
|
+
* 4000 Hz for the receiver, the most CORE allows there.
|
|
190
|
+
*/
|
|
191
|
+
async setPollingRate(pollingRateHz) {
|
|
192
|
+
if (!this.getSupportedPollingRates().includes(pollingRateHz))
|
|
193
|
+
throw new Error(`This connection does not support ${pollingRateHz} Hz.`);
|
|
194
|
+
const profile = this.loadProfile();
|
|
195
|
+
const wirelessHz = Math.min(pollingRateHz, GLORIOUS_CORE2_WIRELESS_MAX_POLLING_HZ);
|
|
196
|
+
await this.write([[encodeGloriousCore2PollingRate(pollingRateHz, wirelessHz, profile), FRAME_GAP_MS]]);
|
|
197
|
+
this.saveState(profile, { ...this.loadState(profile), pollingRateHz });
|
|
198
|
+
return pollingRateHz;
|
|
199
|
+
}
|
|
200
|
+
/** Simple debounce: also clears the advanced press and release times, as CORE does when its advanced switch is off. */
|
|
201
|
+
async setDebounceTime(milliseconds) {
|
|
202
|
+
if (!this.getDebounceOptions().includes(milliseconds)) {
|
|
203
|
+
throw new Error(`Debounce must be ${GLORIOUS_CORE2_DEBOUNCE_MIN_MS} to ${GLORIOUS_CORE2_DEBOUNCE_MAX_MS} ms in steps of ${GLORIOUS_CORE2_DEBOUNCE_STEP_MS}.`);
|
|
204
|
+
}
|
|
205
|
+
const profile = this.loadProfile();
|
|
206
|
+
await this.write([[encodeGloriousCore2Debounce(milliseconds, profile), FRAME_GAP_MS]]);
|
|
207
|
+
this.saveState(profile, { ...this.loadState(profile), debounceMs: milliseconds });
|
|
208
|
+
return milliseconds;
|
|
209
|
+
}
|
|
210
|
+
async setMotionSync(enabled) {
|
|
211
|
+
const profile = this.loadProfile();
|
|
212
|
+
await this.write([[encodeGloriousCore2MotionSync(enabled, profile), FRAME_GAP_MS]]);
|
|
213
|
+
this.saveState(profile, { ...this.loadState(profile), motionSync: enabled });
|
|
214
|
+
return enabled;
|
|
215
|
+
}
|
|
216
|
+
/** Selects the profile on the mouse; from then on writes go to it. 1-based, as in the shell. */
|
|
217
|
+
async setProfile(profile) {
|
|
218
|
+
const frame = encodeGloriousCore2Profile(profile);
|
|
219
|
+
await this.write([[frame, PROFILE_SWITCH_GAP_MS]]);
|
|
220
|
+
this.saveProfile(profile);
|
|
221
|
+
return profile;
|
|
222
|
+
}
|
|
223
|
+
assertStage(stage, count) {
|
|
224
|
+
if (!Number.isInteger(stage) || stage < 0 || stage >= count)
|
|
225
|
+
throw new Error(`DPI stage must be between 1 and ${count}.`);
|
|
226
|
+
}
|
|
227
|
+
async writeStages(profile, stageDpis, activeStage, stageColors) {
|
|
228
|
+
// Encode everything first so a bad value fails before anything is sent.
|
|
229
|
+
const frames = [[encodeGloriousCore2DpiStages(stageDpis, profile), FRAME_GAP_MS]];
|
|
230
|
+
if (stageColors)
|
|
231
|
+
frames.push([encodeGloriousCore2DpiColors(stageColors, profile), FRAME_GAP_MS]);
|
|
232
|
+
frames.push([encodeGloriousCore2ActiveDpiStage(activeStage, profile), ACTIVE_STAGE_GAP_MS]);
|
|
233
|
+
await this.write(frames);
|
|
234
|
+
}
|
|
235
|
+
/** Sends frames in order, each followed by its own pause. */
|
|
236
|
+
write(frames) {
|
|
237
|
+
return this.run(async () => {
|
|
238
|
+
await this.open();
|
|
239
|
+
for (const [body, gapMs] of frames) {
|
|
240
|
+
await this.send(body);
|
|
241
|
+
await delay(gapMs);
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
run(task) {
|
|
246
|
+
const next = this.queue.then(task);
|
|
247
|
+
this.queue = next.catch(() => undefined);
|
|
248
|
+
return next;
|
|
249
|
+
}
|
|
250
|
+
async send(body) {
|
|
251
|
+
await this.device.sendFeatureReport(GLORIOUS_CORE2_REPORT_ID, body);
|
|
252
|
+
}
|
|
253
|
+
/** The reply to the request just sent. WebHID hands back the 64-byte body without the report id. */
|
|
254
|
+
async receive() {
|
|
255
|
+
await delay(REPLY_DELAY_MS);
|
|
256
|
+
const view = await this.device.receiveFeatureReport(GLORIOUS_CORE2_REPORT_ID);
|
|
257
|
+
return new Uint8Array(view.buffer, view.byteOffset, Math.min(view.byteLength, GLORIOUS_CORE2_FRAME_LENGTH));
|
|
258
|
+
}
|
|
259
|
+
async readFirmware() {
|
|
260
|
+
await this.send(encodeGloriousCore2FirmwareRequest(this.isWireless() ? "receiver" : "mouse"));
|
|
261
|
+
return decodeGloriousCore2Firmware(await this.receive());
|
|
262
|
+
}
|
|
263
|
+
async readBattery() {
|
|
264
|
+
await this.send(encodeGloriousCore2BatteryRequest());
|
|
265
|
+
return decodeGloriousCore2Battery(await this.receive());
|
|
266
|
+
}
|
|
267
|
+
getUiHints() {
|
|
268
|
+
return {
|
|
269
|
+
family: "glorious-core2",
|
|
270
|
+
valuesVerified: false,
|
|
271
|
+
showAdvancedSection: true,
|
|
272
|
+
hideUnsupportedPollingRates: true,
|
|
273
|
+
hideAngleSnapping: true,
|
|
274
|
+
hideRippleControl: true,
|
|
275
|
+
hideSleepCard: true,
|
|
276
|
+
hideSignalCard: true,
|
|
277
|
+
forceShowBattery: this.isWireless(),
|
|
278
|
+
pollingNote: "8000 Hz needs the cable; the receiver stops at 4000 Hz. Glorious advises turning Motion Sync off at 8000 Hz.",
|
|
279
|
+
statusNote: "This mouse cannot report its settings or its active profile, so the values shown are the last ones written here. Pick the profile you use: that also selects it on the mouse. Changing one DPI stage rewrites the whole table from the values shown.",
|
|
280
|
+
dpiStageEditor: {
|
|
281
|
+
maxStages: GLORIOUS_CORE2_MAX_DPI_STAGES,
|
|
282
|
+
countEditable: true,
|
|
283
|
+
minDpi: GLORIOUS_CORE2_DPI_MIN,
|
|
284
|
+
maxDpi: GLORIOUS_CORE2_DPI_MAX,
|
|
285
|
+
stepDpi: GLORIOUS_CORE2_DPI_STEP,
|
|
286
|
+
},
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
/** One key per model, not per product id: the cable and the receiver reach the same mouse and the same profiles. */
|
|
290
|
+
storageKey(suffix) {
|
|
291
|
+
return `openmouse-glorious-core2-v1:o2-pro-4k8k:${suffix}`;
|
|
292
|
+
}
|
|
293
|
+
loadProfile() {
|
|
294
|
+
try {
|
|
295
|
+
const stored = Number(localStorage.getItem(this.storageKey("profile")));
|
|
296
|
+
if (Number.isInteger(stored) && stored >= 1 && stored <= GLORIOUS_CORE2_PROFILE_COUNT)
|
|
297
|
+
return stored;
|
|
298
|
+
}
|
|
299
|
+
catch {
|
|
300
|
+
// Fall through to the default when browser storage is unavailable.
|
|
301
|
+
}
|
|
302
|
+
return GLORIOUS_CORE2_PROFILE_DEFAULT;
|
|
303
|
+
}
|
|
304
|
+
saveProfile(profile) {
|
|
305
|
+
try {
|
|
306
|
+
localStorage.setItem(this.storageKey("profile"), String(profile));
|
|
307
|
+
}
|
|
308
|
+
catch {
|
|
309
|
+
// The profile is still selected on the mouse.
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
loadState(profile) {
|
|
313
|
+
const factory = factoryState();
|
|
314
|
+
try {
|
|
315
|
+
const stored = JSON.parse(localStorage.getItem(this.storageKey(`state-p${profile}`)) ?? "null");
|
|
316
|
+
if (!stored || !Array.isArray(stored.stageDpis) || stored.stageDpis.length < 1 || stored.stageDpis.length > GLORIOUS_CORE2_MAX_DPI_STAGES)
|
|
317
|
+
return factory;
|
|
318
|
+
const stageDpis = stored.stageDpis;
|
|
319
|
+
const stageColors = Array.isArray(stored.stageColors) && stored.stageColors.length === stageDpis.length
|
|
320
|
+
? stored.stageColors
|
|
321
|
+
: stageDpis.map((_, index) => STAGE_COLORS[index]);
|
|
322
|
+
return {
|
|
323
|
+
stageDpis,
|
|
324
|
+
stageColors,
|
|
325
|
+
activeStage: Math.min(Math.max(stored.activeStage ?? factory.activeStage, 0), stageDpis.length - 1),
|
|
326
|
+
pollingRateHz: stored.pollingRateHz ?? factory.pollingRateHz,
|
|
327
|
+
debounceMs: stored.debounceMs ?? factory.debounceMs,
|
|
328
|
+
motionSync: stored.motionSync ?? factory.motionSync,
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
catch {
|
|
332
|
+
return factory;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
saveState(profile, state) {
|
|
336
|
+
try {
|
|
337
|
+
localStorage.setItem(this.storageKey(`state-p${profile}`), JSON.stringify(state));
|
|
338
|
+
}
|
|
339
|
+
catch {
|
|
340
|
+
// Settings still reach the mouse when browser storage is unavailable.
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
//# sourceMappingURL=core2-hid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core2-hid.js","sourceRoot":"","sources":["../../../src/drivers/glorious/core2-hid.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kCAAkC,EAClC,8BAA8B,EAC9B,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,2BAA2B,EAC3B,6BAA6B,EAC7B,4BAA4B,EAC5B,uBAAuB,EACvB,4BAA4B,EAC5B,8BAA8B,EAC9B,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,sCAAsC,EACtC,0BAA0B,EAC1B,2BAA2B,EAC3B,iCAAiC,EACjC,iCAAiC,EACjC,2BAA2B,EAC3B,4BAA4B,EAC5B,4BAA4B,EAC5B,kCAAkC,EAClC,6BAA6B,EAC7B,8BAA8B,EAC9B,0BAA0B,GAG3B,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,oEAAoE;AACpE,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,oFAAoF;AACpF,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAChC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC,MAAM,kBAAkB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,E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