From 148616736d5b940abc86a9df6300fc7425e87d88 Mon Sep 17 00:00:00 2001 From: snekxs <26660858+snekxs@users.noreply.github.com> Date: Sun, 30 Aug 2026 01:27:51 -0600 Subject: [PATCH] razer: DeathAdder V4 Pro is reachable over WebHID now, add Carbon Fiber Edition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Razer's own live device allowlist (Synapse Web's AvailableDevices.json, fetched directly from synapse.razer.com/dashboard/) now lists productId 190/191 (0x00be/0x00bf) — the DeathAdder V4 Pro this project marked nativeOnly last month after the control channel genuinely failed on every interface with Synapse stopped. A firmware or descriptor update on Razer's side must have moved the control channel off the Chrome-protected collection; un-flag nativeOnly now that it's reachable again. Also adds the Carbon Fiber Edition (0x00ef/0x00f0, productId 239/240 in the same live allowlist) — a cosmetic SKU not yet in OpenRazer's own table, so its transaction id is assumed rather than audited (declared as such in the divergence test). Full test suite passes (572/572), including the nativeOnly-rejection test (retargeted at the Viper Ultimate wireless receiver, which the same allowlist still does not list) and the transaction-id audit. Co-Authored-By: Claude Sonnet 5 --- src/drivers/razer/devices.test.ts | 6 ++++++ src/drivers/razer/hid.test.ts | 11 +++++++---- src/razer/devices.ts | 25 ++++++++++++++++++++----- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/drivers/razer/devices.test.ts b/src/drivers/razer/devices.test.ts index ef50045..f226fd6 100644 --- a/src/drivers/razer/devices.test.ts +++ b/src/drivers/razer/devices.test.ts @@ -336,6 +336,12 @@ const EXPECTED_DIVERGENCE: ReadonlyMap { diff --git a/src/drivers/razer/hid.test.ts b/src/drivers/razer/hid.test.ts index 71d2609..1e888ff 100644 --- a/src/drivers/razer/hid.test.ts +++ b/src/drivers/razer/hid.test.ts @@ -532,13 +532,16 @@ test("the DeathAdder V2 is accepted on either interface shape", () => { }); test("a nativeOnly model is never accepted, whatever the interface shape", () => { - // The DeathAdder V4 Pro 0x00be has its control channel on a collection the - // browser refuses to expose. A granted device may still enumerate through - // getDevices()/auto-reconnect, so isSupported must refuse it regardless. + // The Viper Ultimate wireless receiver 0x007b has its control channel on a + // collection the browser refuses to expose. A granted device may still + // enumerate through getDevices()/auto-reconnect, so isSupported must refuse + // it regardless. (The DeathAdder V4 Pro used to be this test's example — + // Razer's own live AvailableDevices.json now lists it, so it's no longer + // nativeOnly; see devices.ts.) // Arrange const mouse = { vendorId: 0x1532, - productId: 0x00be, + productId: 0x007b, collections: [{ usagePage: 0x01, usage: 0x02, featureReports: [], children: [] }], } as unknown as HIDDevice; const vendor = { diff --git a/src/razer/devices.ts b/src/razer/devices.ts index 4743879..849b1cd 100644 --- a/src/razer/devices.ts +++ b/src/razer/devices.ts @@ -219,6 +219,11 @@ const TRANSACTION_1F: readonly number[] = [ // name. The SE reference separately mentions `0xff`, but only for the // HyperPolling dongle indicator command, which this driver does not send. 0x00de, 0x00df, + // DeathAdder V4 Pro Carbon Fiber Edition. Same electronics as `0x00be`/ + // `0x00bf` under a cosmetic SKU (Razer's own live `AvailableDevices.json` + // groups them the same way, receiver id one above the mouse id), so it + // shares that pair's transaction id — not independently audited. + 0x00ef, 0x00f0, ]; /** @@ -614,15 +619,25 @@ const PRODUCT_DEFINITIONS: ReadonlyArray<[number, Omit