Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions public/devices/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,3 +264,8 @@ package:
render from Dareu's driver panel
(`https://driver.dareu.com/allinone/products/1117/TM271F.png?v=1.3.24`). It
is vendor product art; request licensing review before publishing it in R2.

- `coolermaster-mm711.png` — Cooler Master MM711 wired gaming mouse (`0x2516:0x0101`).
**Needs a maintainer upload** to the `openmouse-devices` R2 bucket; the mapping in
`src/ui/device-images.ts` is in place and falls back cleanly to the placeholder until then.

3 changes: 2 additions & 1 deletion src/device/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ import { IncottHidClient } from "@openmouse/protocol/drivers/incott/hid";
import { BytechHidClient } from "@openmouse/protocol/drivers/bytech/hid";
import { FaterHidClient } from "@openmouse/protocol/drivers/fater/hid";
import { RapooHidClient } from "@openmouse/protocol/drivers/rapoo/hid";
import { CoolerMasterHidClient } from "@openmouse/protocol/drivers/coolermaster/hid";
import { parsePreviewMode, previewsEnabled, type PreviewMode } from "../preview-modes";
import { sleepLabel } from "./options";
import { traitsFor } from "./traits";
Expand Down Expand Up @@ -258,7 +259,7 @@ function activeAs<T>(...classes: ClientClass<T>[]): T | null {

const DM_CLASSES = [WLMouseHidClient, LamzuHidClient, LamzuAtlantisHidClient, AtkHidClient, AtkBitmouseHidClient, NinjutsoHidClient] as const;
const RAZER_CLASSES = [RazerHidClient, RazerViperMiniHidClient, RazerViperHidClient, RazerCobraHidClient] as const;
const NEEDS_OPEN = [LamzuAtlantisHidClient, TeevolutionHidClient, VgnF2HidClient, KeychronNapeHidClient, Keychron8kNordicHidClient, WLMouseBeastX4kHidClient, ModdoHidClient, ZaunkoenigHidClient, CorsairHidClient, FantechHidClient, WallhackMouseHidClient, WallhackKeyboardHidClient, GloriousHidClient, GloriousClassicHidClient, MchoseHidClient, MchoseDockHidClient, MchoseA5ProMaxHidClient, MchoseV3HidClient, MicrosoftHidClient, DareuHidClient, IncottHidClient, BytechHidClient, RapooHidClient, FaterHidClient] as const;
const NEEDS_OPEN = [LamzuAtlantisHidClient, TeevolutionHidClient, VgnF2HidClient, KeychronNapeHidClient, Keychron8kNordicHidClient, WLMouseBeastX4kHidClient, ModdoHidClient, ZaunkoenigHidClient, CorsairHidClient, FantechHidClient, WallhackMouseHidClient, WallhackKeyboardHidClient, GloriousHidClient, GloriousClassicHidClient, MchoseHidClient, MchoseDockHidClient, MchoseA5ProMaxHidClient, MchoseV3HidClient, MicrosoftHidClient, DareuHidClient, IncottHidClient, BytechHidClient, RapooHidClient, FaterHidClient, CoolerMasterHidClient] as const;
const PULSAR_CLASSES = [PulsarHidClient, PulsarProHidClient, PulsarXs1HidClient] as const;

const logitechClient = (): LogitechHidppClient | null => activeAs(LogitechHidppClient);
Expand Down
3 changes: 3 additions & 0 deletions src/device/traits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ const BY_FAMILY: Readonly<Record<string, Partial<DriverTraits>>> = {
// no signal, sleep or debounce card exists, and the processing card is
// deliberately hidden, so no advanced-section flags are needed.
hyperx: {},
"cooler master": { advancedSection: true, debounce: true },
"coolermaster-mm711": { advancedSection: true, debounce: true },
};

const BY_BRAND: Readonly<Record<string, string>> = {
Expand All @@ -101,6 +103,7 @@ const BY_BRAND: Readonly<Record<string, string>> = {
Logitech: "logitech-hidpp",
"Attack Shark": "attack-shark",
IPI: "bytech",
"Cooler Master": "cooler master",
};

export function familyOf(status: MouseStatus): string {
Expand Down
2 changes: 1 addition & 1 deletion src/supported-devices-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ export const SUPPORTED_DEVICES: readonly SupportedDeviceEntry[] = [
{ brand: "Bloody", model: "Max W95", status: "driver" },
{ brand: "Fantech", model: "THOR II X16", status: "driver" },
{ brand: "Cooler Master", model: "MasterMouse MM720", status: "driver" },
{ brand: "Cooler Master", model: "MM711", status: "driver" },
{ brand: "Cooler Master", model: "MM711", status: "supported", pids: [0x0101] },
{ brand: "K-snake", model: "X11", status: "supported", pids: [0x2255] },
{ brand: "Noir Gear", model: "M2-NEX", status: "supported", pids: [0x2255] },
{ brand: "Hitscan", model: "Hyperlight", status: "unknown" },
Expand Down
5 changes: 5 additions & 0 deletions src/ui/device-images.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ test("Dareu A950 PRO Mg resolves by name", () => {
assert.equal(deviceImage(null, "Dareu A950 PRO Mg"), CDN + "dareu-a950-pro-mg.png");
});

test("Cooler Master MM711 resolves by name", () => {
assert.equal(deviceImage(null, "Cooler Master MM711"), CDN + "coolermaster-mm711.png");
assert.equal(deviceImage(null, "MM711"), CDN + "coolermaster-mm711.png");
});

test("Delux M800 Mini and M800 family resolve by name", () => {
assert.equal(deviceImage(null, "Delux M800 Mini"), "/devices/delux-m800-mini.png");
assert.equal(deviceImage(null, "Delux M800 Mini (Wireless)"), "/devices/delux-m800-mini.png");
Expand Down
1 change: 1 addition & 0 deletions src/ui/device-images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ function resolveDeviceImageFilename(_device: HIDDevice | null | undefined, displ
if (/\ba7\s*v3\b/i.test(displayName)) return "mchose-a7-v3.png";
if (/\ba7\s*v2\b/i.test(displayName)) return "mchose-a7-v2.png";
if (/\ba950\s*pro\s*mg\b/i.test(displayName)) return "dareu-a950-pro-mg.png";
if (/\bmm711\b/i.test(displayName)) return "coolermaster-mm711.png";
// NinjaForce/Ninjutso family — V3 first so "Sora V3" isn't swallowed by a
// looser V2 or "Ten" match.
if (/\bsora\s*v3\b/i.test(displayName)) return "ninjutso-sora-v3.png";
Expand Down
Loading