Skip to content
Merged
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
8 changes: 7 additions & 1 deletion src/device/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ import { MicrosoftHidClient } from "@openmouse/protocol/drivers/microsoft/hid";
import { DareuHidClient } from "@openmouse/protocol/drivers/dareu/hid";
import { IncottHidClient } from "@openmouse/protocol/drivers/incott/hid";
import { BytechHidClient } from "@openmouse/protocol/drivers/bytech/hid";
import { RapooHidClient } from "@openmouse/protocol/drivers/rapoo/hid";
import { parsePreviewMode, previewsEnabled, type PreviewMode } from "../preview-modes";
import { sleepLabel } from "./options";
import { traitsFor } from "./traits";
Expand Down Expand Up @@ -243,7 +244,12 @@ 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, KeychronM6HidClient, WLMouseBeastX4kHidClient, ModdoHidClient, ZaunkoenigHidClient, CorsairHidClient, FantechHidClient, WallhackMouseHidClient, WallhackKeyboardHidClient, GloriousHidClient, GloriousClassicHidClient, MchoseHidClient, MchoseDockHidClient, MchoseA5ProMaxHidClient, MchoseV3HidClient, MicrosoftHidClient, DareuHidClient, IncottHidClient, BytechHidClient] as const;
// Rapoo's VT9 Pro listens on its own vendor collection and answers reads
// through GET_REPORT(Input), which in the browser means OpenMouse Bridge:
// opening it on connect is what makes the register walk in readStatus()
// possible, and the driver reports the battery on its own when Bridge is
// absent rather than failing.
const NEEDS_OPEN = [LamzuAtlantisHidClient, TeevolutionHidClient, VgnF2HidClient, KeychronNapeHidClient, KeychronM6HidClient, WLMouseBeastX4kHidClient, ModdoHidClient, ZaunkoenigHidClient, CorsairHidClient, FantechHidClient, WallhackMouseHidClient, WallhackKeyboardHidClient, GloriousHidClient, GloriousClassicHidClient, MchoseHidClient, MchoseDockHidClient, MchoseA5ProMaxHidClient, MchoseV3HidClient, MicrosoftHidClient, DareuHidClient, IncottHidClient, BytechHidClient, RapooHidClient] as const;
const PULSAR_CLASSES = [PulsarHidClient, PulsarProHidClient, PulsarXs1HidClient] as const;

const logitechClient = (): LogitechHidppClient | null => activeAs(LogitechHidppClient);
Expand Down