feat(razer): add DeathAdder V2 support with macOS Input Monitoring hint - #58
Merged
Merged
Conversation
The V2 keeps the Essential family's legacy transaction id (0x3f) and interface layout, but reads and writes DPI through the no-store byte (0x00) instead of the storage byte (0x01). The store byte is now a per-product field; the default preserves the V3 family's behavior.
The V2's configuration channel lives on a separate interface like the Essential family, so a single-collection filter would never match it. Request the whole device the same way, letting the browser offer every interface and the driver reject the ones that cannot answer.
IndoRexian
approved these changes
Aug 9, 2026
|
Sorry, I approved this by accident, could someone with write access dismiss my review? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for the Razer DeathAdder V2, plus a macOS fix that turns the browser’s opaque “Failed to open the device.” error into an actionable Input Monitoring hint for every Razer driver.
Changes
1. DeathAdder V2 driver
The V2 keeps the Essential family’s legacy transaction id (
0x3f) and interface layout, so it reuses the existing Razer driver. It differs in two ways, both taken from OpenRazer’s driver:DPI_MAXfor this model), instead of the Essential’s 6,400.NOSTOREbyte (0x00) rather than the storage byte (0x01) the Essential and the V3 Pro use. The store byte is now a per-product field (dpiStorageByte); the default preserves the V3 family’s behavior. A wrong store fails loudly (implausible DPI read-back) rather than silently, because DPI is read before and after every write.2. Device picker
Like the Essential family, the V2’s configuration channel lives on a separate HID interface, so a single-collection filter never matches it. The picker now requests the whole device and lets the driver reject interfaces that cannot answer.
3. macOS Input Monitoring hint
Razer’s configuration channel lives on a Generic Desktop Mouse collection, which macOS reserves for its own input stack. Without the Input Monitoring TCC permission the browser’s
IOHIDDeviceOpenfails withkIOReturnNotPermitted, which WebHID surfaces as a generic error. The newopenRazerDevice()wraps the open for all Razer drivers and appends an actionable hint pointing to System Settings → Privacy & Security → Input Monitoring. Nothing in the app can grant that permission — it is a system permission on the browser itself.Testing
npm run buildpasses.npm testpasses — 206 tests, 0 failures.Hardware verification
Not yet hardware-tested. The driver is derived from OpenRazer’s DeathAdder V2 configuration (transaction id, interface layout, DPI ceiling, and store byte). A step-by-step checklist is in
src/devices/razer/TESTING.md; step 6 (read DPI against Synapse before writing anything) is what separates a store-byte problem from a write problem.