@openmouse/protocol 0.16.0 → 0.18.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 +69 -0
- package/dist/asus/devices.d.ts.map +1 -0
- package/dist/asus/devices.js +148 -0
- package/dist/asus/devices.js.map +1 -0
- package/dist/asus/index.d.ts +42 -35
- package/dist/asus/index.d.ts.map +1 -1
- package/dist/asus/index.js +155 -184
- package/dist/asus/index.js.map +1 -1
- package/dist/bytech/index.d.ts +33 -0
- package/dist/bytech/index.d.ts.map +1 -0
- package/dist/bytech/index.js +179 -0
- package/dist/bytech/index.js.map +1 -0
- package/dist/drivers/asus/hid.d.ts +9 -3
- package/dist/drivers/asus/hid.d.ts.map +1 -1
- package/dist/drivers/asus/hid.js +148 -248
- package/dist/drivers/asus/hid.js.map +1 -1
- package/dist/drivers/atk/hid.d.ts +2 -0
- package/dist/drivers/atk/hid.d.ts.map +1 -1
- package/dist/drivers/atk/hid.js +29 -8
- package/dist/drivers/atk/hid.js.map +1 -1
- package/dist/drivers/atk/products.d.ts.map +1 -1
- package/dist/drivers/atk/products.js +1 -0
- package/dist/drivers/atk/products.js.map +1 -1
- package/dist/drivers/attackshark/hid.d.ts.map +1 -1
- package/dist/drivers/attackshark/hid.js +55 -29
- package/dist/drivers/attackshark/hid.js.map +1 -1
- package/dist/drivers/bytech/hid.d.ts +49 -0
- package/dist/drivers/bytech/hid.d.ts.map +1 -0
- package/dist/drivers/bytech/hid.js +344 -0
- package/dist/drivers/bytech/hid.js.map +1 -0
- package/dist/drivers/endgame/egg-op1-hid.d.ts +14 -2
- package/dist/drivers/endgame/egg-op1-hid.d.ts.map +1 -1
- package/dist/drivers/endgame/egg-op1-hid.js +100 -17
- package/dist/drivers/endgame/egg-op1-hid.js.map +1 -1
- package/dist/drivers/microsoft/hid.d.ts.map +1 -1
- package/dist/drivers/microsoft/hid.js +11 -0
- package/dist/drivers/microsoft/hid.js.map +1 -1
- package/dist/drivers/mouse-types.d.ts +3 -1
- package/dist/drivers/mouse-types.d.ts.map +1 -1
- package/dist/drivers/registry.d.ts +3 -2
- package/dist/drivers/registry.d.ts.map +1 -1
- package/dist/drivers/registry.js +4 -2
- package/dist/drivers/registry.js.map +1 -1
- package/dist/drivers/vendors.d.ts +4 -8
- package/dist/drivers/vendors.d.ts.map +1 -1
- package/dist/drivers/vendors.js +12 -17
- package/dist/drivers/vendors.js.map +1 -1
- package/dist/endgame-gear/op1.d.ts +36 -0
- package/dist/endgame-gear/op1.d.ts.map +1 -1
- package/dist/endgame-gear/op1.js +59 -39
- package/dist/endgame-gear/op1.js.map +1 -1
- 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/package.json +5 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ASUS ROG / TUF per-PID capability table.
|
|
3
|
+
*
|
|
4
|
+
* Every ASUS mouse from the Gladius II onward speaks the same 64-byte
|
|
5
|
+
* protocol (`12 xx` reads, `51 31` settings, `51 28` lighting, `50 03` save).
|
|
6
|
+
* What differs per model, and what this table records, is how many DPI stages
|
|
7
|
+
* the settings block holds, the DPI step, and which optional commands exist.
|
|
8
|
+
*
|
|
9
|
+
* ## Provenance
|
|
10
|
+
*
|
|
11
|
+
* Only `verified: true` entries have been exercised on hardware by this
|
|
12
|
+
* project. The rest are transcribed facts, not a tested driver:
|
|
13
|
+
*
|
|
14
|
+
* - G-Helper (seerge/g-helper, `app/Peripherals/Mouse/Models/*.cs`): product
|
|
15
|
+
* ids, stage counts, DPI ranges and steps, profile counts, zones, and which
|
|
16
|
+
* settings each model exposes.
|
|
17
|
+
* - libratbag (`data/devices/asus-*.device`): cross-checks for the Strix
|
|
18
|
+
* Impact III and Harpe Ace.
|
|
19
|
+
* - OpenRGB (`AsusAuraMouseDevices.h`): lighting zones and effect order, and
|
|
20
|
+
* the only public source for the Gladius II Core.
|
|
21
|
+
*
|
|
22
|
+
* The Gladius II Core has no public DPI data. Its stage count, step and ceiling
|
|
23
|
+
* are taken from the TUF Gaming M5, the same generation with the same
|
|
24
|
+
* 6200-DPI sensor, and profiles are held at 1 until an owner confirms more.
|
|
25
|
+
*
|
|
26
|
+
* ## Why an unverified entry is safe to ship
|
|
27
|
+
*
|
|
28
|
+
* Every setter reads the value back. A wrong stage count or step shows up as
|
|
29
|
+
* a read-back mismatch, never as a silent success, and none of these commands
|
|
30
|
+
* touch firmware or calibration except the lift-off write, which is only
|
|
31
|
+
* enabled where G-Helper already sends it.
|
|
32
|
+
*
|
|
33
|
+
* ## Deliberately absent
|
|
34
|
+
*
|
|
35
|
+
* The ROG Omni receiver (`0x1ace`) is shared by several mice and needs a model
|
|
36
|
+
* identification handshake before any of this applies.
|
|
37
|
+
*/
|
|
38
|
+
/** Effect names, spelled as the shared `MouseLightingMode` values. */
|
|
39
|
+
export type AsusLightingEffect = "Static" | "Breathing single" | "Cycling" | "Spectrum" | "Reactive" | "Wave";
|
|
40
|
+
export interface AsusMouseModel {
|
|
41
|
+
name: string;
|
|
42
|
+
wireless: boolean;
|
|
43
|
+
/** Stages in the settings block; also shifts the rate/debounce/snap fields. */
|
|
44
|
+
dpiStages: 2 | 4;
|
|
45
|
+
minDpi: number;
|
|
46
|
+
maxDpi: number;
|
|
47
|
+
/** Wire value is `dpi / step - 1`. */
|
|
48
|
+
dpiStep: 50 | 100;
|
|
49
|
+
/** DPI is read from the `12 04 02` X/Y block instead of `12 04 00`. */
|
|
50
|
+
dpiXY?: boolean;
|
|
51
|
+
/** A DPI write carries the stage's indicator colour, so it must be resent. */
|
|
52
|
+
dpiColors?: boolean;
|
|
53
|
+
profiles: number;
|
|
54
|
+
debounce: boolean;
|
|
55
|
+
liftOff: boolean;
|
|
56
|
+
battery: boolean;
|
|
57
|
+
/** Zone names in wire order. */
|
|
58
|
+
zones: readonly string[];
|
|
59
|
+
/** Wire byte for each effect the model offers, in display order. */
|
|
60
|
+
lightingModes: Readonly<Partial<Record<AsusLightingEffect, number>>>;
|
|
61
|
+
/** Older firmware scales brightness 0-4, newer 0-100. */
|
|
62
|
+
brightnessMax: 4 | 100;
|
|
63
|
+
/** Older firmware answers `12 03 00` with every zone in one reply. */
|
|
64
|
+
lightingAllZones?: boolean;
|
|
65
|
+
verified: boolean;
|
|
66
|
+
}
|
|
67
|
+
export declare const ASUS_MICE: ReadonlyMap<number, AsusMouseModel>;
|
|
68
|
+
export declare const ASUS_PRODUCT_IDS: readonly number[];
|
|
69
|
+
//# sourceMappingURL=devices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devices.d.ts","sourceRoot":"","sources":["../../src/asus/devices.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,sEAAsE;AACtE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,kBAAkB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;AAE9G,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,+EAA+E;IAC/E,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,OAAO,EAAE,EAAE,GAAG,GAAG,CAAC;IAClB,uEAAuE;IACvE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,gCAAgC;IAChC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,oEAAoE;IACpE,aAAa,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACrE,yDAAyD;IACzD,aAAa,EAAE,CAAC,GAAG,GAAG,CAAC;IACvB,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;CACnB;AA6DD,eAAO,MAAM,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAsDxD,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAA0B,CAAC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ASUS ROG / TUF per-PID capability table.
|
|
3
|
+
*
|
|
4
|
+
* Every ASUS mouse from the Gladius II onward speaks the same 64-byte
|
|
5
|
+
* protocol (`12 xx` reads, `51 31` settings, `51 28` lighting, `50 03` save).
|
|
6
|
+
* What differs per model, and what this table records, is how many DPI stages
|
|
7
|
+
* the settings block holds, the DPI step, and which optional commands exist.
|
|
8
|
+
*
|
|
9
|
+
* ## Provenance
|
|
10
|
+
*
|
|
11
|
+
* Only `verified: true` entries have been exercised on hardware by this
|
|
12
|
+
* project. The rest are transcribed facts, not a tested driver:
|
|
13
|
+
*
|
|
14
|
+
* - G-Helper (seerge/g-helper, `app/Peripherals/Mouse/Models/*.cs`): product
|
|
15
|
+
* ids, stage counts, DPI ranges and steps, profile counts, zones, and which
|
|
16
|
+
* settings each model exposes.
|
|
17
|
+
* - libratbag (`data/devices/asus-*.device`): cross-checks for the Strix
|
|
18
|
+
* Impact III and Harpe Ace.
|
|
19
|
+
* - OpenRGB (`AsusAuraMouseDevices.h`): lighting zones and effect order, and
|
|
20
|
+
* the only public source for the Gladius II Core.
|
|
21
|
+
*
|
|
22
|
+
* The Gladius II Core has no public DPI data. Its stage count, step and ceiling
|
|
23
|
+
* are taken from the TUF Gaming M5, the same generation with the same
|
|
24
|
+
* 6200-DPI sensor, and profiles are held at 1 until an owner confirms more.
|
|
25
|
+
*
|
|
26
|
+
* ## Why an unverified entry is safe to ship
|
|
27
|
+
*
|
|
28
|
+
* Every setter reads the value back. A wrong stage count or step shows up as
|
|
29
|
+
* a read-back mismatch, never as a silent success, and none of these commands
|
|
30
|
+
* touch firmware or calibration except the lift-off write, which is only
|
|
31
|
+
* enabled where G-Helper already sends it.
|
|
32
|
+
*
|
|
33
|
+
* ## Deliberately absent
|
|
34
|
+
*
|
|
35
|
+
* The ROG Omni receiver (`0x1ace`) is shared by several mice and needs a model
|
|
36
|
+
* identification handshake before any of this applies.
|
|
37
|
+
*/
|
|
38
|
+
const GLADIUS_II_MODES = {
|
|
39
|
+
Static: 0x00,
|
|
40
|
+
"Breathing single": 0x01,
|
|
41
|
+
Cycling: 0x02,
|
|
42
|
+
Spectrum: 0x03,
|
|
43
|
+
Reactive: 0x04,
|
|
44
|
+
Wave: 0x05,
|
|
45
|
+
};
|
|
46
|
+
// These models put Reactive at 0x03 (G-Helper and OpenRGB agree).
|
|
47
|
+
const TUF_MODES = {
|
|
48
|
+
Static: 0x00,
|
|
49
|
+
"Breathing single": 0x01,
|
|
50
|
+
Cycling: 0x02,
|
|
51
|
+
Reactive: 0x03,
|
|
52
|
+
};
|
|
53
|
+
const MODERN_MODES = {
|
|
54
|
+
Static: 0x00,
|
|
55
|
+
"Breathing single": 0x01,
|
|
56
|
+
Cycling: 0x02,
|
|
57
|
+
Reactive: 0x04,
|
|
58
|
+
};
|
|
59
|
+
const HARPE_ACE_AIM_LAB = {
|
|
60
|
+
name: "ROG Harpe Ace Aim Lab Edition",
|
|
61
|
+
dpiStages: 4,
|
|
62
|
+
minDpi: 50,
|
|
63
|
+
maxDpi: 36_000,
|
|
64
|
+
dpiStep: 50,
|
|
65
|
+
dpiXY: true,
|
|
66
|
+
dpiColors: true,
|
|
67
|
+
profiles: 5,
|
|
68
|
+
debounce: true,
|
|
69
|
+
liftOff: true,
|
|
70
|
+
battery: true,
|
|
71
|
+
zones: ["Scroll wheel"],
|
|
72
|
+
lightingModes: MODERN_MODES,
|
|
73
|
+
brightnessMax: 100,
|
|
74
|
+
verified: false,
|
|
75
|
+
};
|
|
76
|
+
const TUF_M5 = {
|
|
77
|
+
name: "TUF Gaming M5",
|
|
78
|
+
wireless: false,
|
|
79
|
+
dpiStages: 2,
|
|
80
|
+
minDpi: 100,
|
|
81
|
+
maxDpi: 6_200,
|
|
82
|
+
dpiStep: 100,
|
|
83
|
+
profiles: 3,
|
|
84
|
+
debounce: true,
|
|
85
|
+
liftOff: false,
|
|
86
|
+
battery: false,
|
|
87
|
+
zones: ["Logo"],
|
|
88
|
+
lightingModes: TUF_MODES,
|
|
89
|
+
brightnessMax: 4,
|
|
90
|
+
verified: false,
|
|
91
|
+
};
|
|
92
|
+
export const ASUS_MICE = new Map([
|
|
93
|
+
[0x1845, {
|
|
94
|
+
name: "ROG Gladius II",
|
|
95
|
+
wireless: false,
|
|
96
|
+
dpiStages: 2,
|
|
97
|
+
minDpi: 100,
|
|
98
|
+
maxDpi: 12_000,
|
|
99
|
+
dpiStep: 100,
|
|
100
|
+
profiles: 3,
|
|
101
|
+
debounce: true,
|
|
102
|
+
liftOff: true,
|
|
103
|
+
battery: false,
|
|
104
|
+
zones: ["Logo", "Scroll wheel", "Underglow"],
|
|
105
|
+
lightingModes: GLADIUS_II_MODES,
|
|
106
|
+
brightnessMax: 4,
|
|
107
|
+
lightingAllZones: true,
|
|
108
|
+
verified: true,
|
|
109
|
+
}],
|
|
110
|
+
[0x18dd, { ...TUF_M5, name: "ROG Gladius II Core", profiles: 1, zones: ["Logo", "Scroll wheel"] }],
|
|
111
|
+
[0x1898, TUF_M5],
|
|
112
|
+
[0x1910, {
|
|
113
|
+
name: "TUF Gaming M3",
|
|
114
|
+
wireless: false,
|
|
115
|
+
dpiStages: 4,
|
|
116
|
+
minDpi: 100,
|
|
117
|
+
maxDpi: 7_000,
|
|
118
|
+
dpiStep: 100,
|
|
119
|
+
profiles: 1,
|
|
120
|
+
debounce: true,
|
|
121
|
+
liftOff: false,
|
|
122
|
+
battery: false,
|
|
123
|
+
zones: ["Logo"],
|
|
124
|
+
lightingModes: TUF_MODES,
|
|
125
|
+
brightnessMax: 4,
|
|
126
|
+
verified: false,
|
|
127
|
+
}],
|
|
128
|
+
[0x1a88, {
|
|
129
|
+
name: "ROG Strix Impact III",
|
|
130
|
+
wireless: false,
|
|
131
|
+
dpiStages: 4,
|
|
132
|
+
minDpi: 100,
|
|
133
|
+
maxDpi: 12_000,
|
|
134
|
+
dpiStep: 50,
|
|
135
|
+
profiles: 3,
|
|
136
|
+
debounce: false,
|
|
137
|
+
liftOff: false,
|
|
138
|
+
battery: false,
|
|
139
|
+
zones: ["Logo", "Scroll wheel"],
|
|
140
|
+
lightingModes: MODERN_MODES,
|
|
141
|
+
brightnessMax: 100,
|
|
142
|
+
verified: false,
|
|
143
|
+
}],
|
|
144
|
+
[0x1a92, { ...HARPE_ACE_AIM_LAB, wireless: false }],
|
|
145
|
+
[0x1a94, { ...HARPE_ACE_AIM_LAB, wireless: true }],
|
|
146
|
+
]);
|
|
147
|
+
export const ASUS_PRODUCT_IDS = [...ASUS_MICE.keys()];
|
|
148
|
+
//# sourceMappingURL=devices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devices.js","sourceRoot":"","sources":["../../src/asus/devices.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAiCH,MAAM,gBAAgB,GAAG;IACvB,MAAM,EAAE,IAAI;IACZ,kBAAkB,EAAE,IAAI;IACxB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE,IAAI;CACF,CAAC;AAEX,kEAAkE;AAClE,MAAM,SAAS,GAAG;IAChB,MAAM,EAAE,IAAI;IACZ,kBAAkB,EAAE,IAAI;IACxB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;CACN,CA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D,CAAC,MAAM,EAAE,EAAE,GAAG,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;CACnD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAsB,CAAC,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC"}
|
package/dist/asus/index.d.ts
CHANGED
|
@@ -1,52 +1,59 @@
|
|
|
1
|
+
import type { AsusMouseModel } from "./devices.js";
|
|
2
|
+
export * from "./devices.js";
|
|
1
3
|
export declare const ASUS_VENDOR_ID = 2821;
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const ASUS_GLADIUS_II_USAGE = 1;
|
|
4
|
+
export declare const ASUS_USAGE_PAGE = 65281;
|
|
5
|
+
export declare const ASUS_USAGE = 1;
|
|
5
6
|
export declare const ASUS_REPORT_ID = 0;
|
|
6
7
|
export declare const ASUS_REPORT_SIZE = 64;
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
export declare const GLADIUS_II_DEBOUNCE_MS: readonly [12, 16, 20, 24, 28, 32];
|
|
13
|
-
export type GladiusIILiftOffDistance = "Low" | "High";
|
|
14
|
-
export interface GladiusIISettings {
|
|
15
|
-
dpiStages: [number, number];
|
|
8
|
+
export declare const ASUS_POLLING_RATES: readonly [125, 250, 500, 1000];
|
|
9
|
+
export declare const ASUS_DEBOUNCE_MS: readonly [12, 16, 20, 24, 28, 32];
|
|
10
|
+
export type AsusLiftOffDistance = "Low" | "High";
|
|
11
|
+
export interface AsusSettings {
|
|
12
|
+
dpiStages: number[];
|
|
16
13
|
pollingRateHz: number;
|
|
17
14
|
debounceMs: number | null;
|
|
18
15
|
angleSnapping: boolean;
|
|
19
16
|
}
|
|
20
|
-
export interface
|
|
17
|
+
export interface AsusProfile {
|
|
21
18
|
onboardProfile: number;
|
|
22
19
|
activeDpiStage: number;
|
|
23
20
|
}
|
|
24
|
-
export interface
|
|
25
|
-
zone: number;
|
|
21
|
+
export interface AsusRawLightingZone {
|
|
26
22
|
mode: number;
|
|
23
|
+
/** Wire scale, 0 to the model's `brightnessMax`. */
|
|
27
24
|
brightness: number;
|
|
28
25
|
red: number;
|
|
29
26
|
green: number;
|
|
30
27
|
blue: number;
|
|
31
|
-
direction: number;
|
|
32
|
-
randomColor: boolean;
|
|
33
|
-
speed: number;
|
|
34
28
|
}
|
|
35
|
-
export
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
export
|
|
40
|
-
export declare function
|
|
41
|
-
|
|
42
|
-
export declare function
|
|
43
|
-
export declare function
|
|
44
|
-
export declare function
|
|
45
|
-
export declare function
|
|
46
|
-
export declare function
|
|
47
|
-
export declare function
|
|
48
|
-
export declare function
|
|
49
|
-
export declare function
|
|
50
|
-
export declare function
|
|
51
|
-
export declare function
|
|
29
|
+
export interface AsusBattery {
|
|
30
|
+
percent: number;
|
|
31
|
+
charging: boolean;
|
|
32
|
+
}
|
|
33
|
+
export type AsusRgb = readonly [number, number, number];
|
|
34
|
+
export declare function asusDecodeSettings(model: AsusMouseModel, data: Uint8Array): AsusSettings;
|
|
35
|
+
/** X values from the `12 04 02` block, four bytes (X, Y) per stage. */
|
|
36
|
+
export declare function asusDecodeDpiXY(model: AsusMouseModel, data: Uint8Array): number[];
|
|
37
|
+
export declare function asusDecodeDpiColors(model: AsusMouseModel, data: Uint8Array): AsusRgb[];
|
|
38
|
+
export declare function asusDecodeProfile(model: AsusMouseModel, data: Uint8Array): AsusProfile;
|
|
39
|
+
export declare function asusDecodeLiftOffDistance(data: Uint8Array): AsusLiftOffDistance;
|
|
40
|
+
export declare function asusDecodeLighting(model: AsusMouseModel, data: Uint8Array, zone: number): AsusRawLightingZone;
|
|
41
|
+
export declare function asusDecodeBattery(data: Uint8Array): AsusBattery;
|
|
42
|
+
export declare function asusReadSettingsRequest(): Uint8Array;
|
|
43
|
+
export declare function asusReadDpiXYRequest(): Uint8Array;
|
|
44
|
+
export declare function asusReadDpiColorsRequest(): Uint8Array;
|
|
45
|
+
export declare function asusReadProfileRequest(): Uint8Array;
|
|
46
|
+
export declare function asusReadLiftOffRequest(): Uint8Array;
|
|
47
|
+
export declare function asusReadLightingRequest(model: AsusMouseModel, zone: number): Uint8Array;
|
|
48
|
+
export declare function asusReadBatteryRequest(): Uint8Array;
|
|
49
|
+
export declare function asusSetDpiRequest(model: AsusMouseModel, stage: number, dpi: number, color?: AsusRgb): Uint8Array;
|
|
50
|
+
export declare function asusSetActiveDpiStageRequest(model: AsusMouseModel, stage: number): Uint8Array;
|
|
51
|
+
export declare function asusSetPollingRateRequest(model: AsusMouseModel, pollingRateHz: number): Uint8Array;
|
|
52
|
+
export declare function asusSetProfileRequest(model: AsusMouseModel, profile: number): Uint8Array;
|
|
53
|
+
export declare function asusSetAngleSnappingRequest(model: AsusMouseModel, enabled: boolean): Uint8Array;
|
|
54
|
+
export declare function asusSetDebounceRequest(model: AsusMouseModel, milliseconds: number): Uint8Array;
|
|
55
|
+
/** Also resets the surface calibration; ASUS has no separate lift-off command. */
|
|
56
|
+
export declare function asusSetLiftOffRequest(value: AsusLiftOffDistance): Uint8Array;
|
|
57
|
+
export declare function asusSetLightingRequest(model: AsusMouseModel, zone: number, mode: number, brightness: number, red: number, green: number, blue: number, speed?: number): Uint8Array;
|
|
58
|
+
export declare function asusSaveRequest(): Uint8Array;
|
|
52
59
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/asus/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/asus/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/asus/index.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,cAAc,cAAc,CAAC;AAE7B,eAAO,MAAM,cAAc,OAAS,CAAC;AAErC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