Skip to content

razer: add Cobra wired mouse support (hardware-verified) - #66

Merged
snekxs merged 10 commits into
OpenMouse-Project:devfrom
jazzstack:razer-cobra
Aug 11, 2026
Merged

razer: add Cobra wired mouse support (hardware-verified)#66
snekxs merged 10 commits into
OpenMouse-Project:devfrom
jazzstack:razer-cobra

Conversation

@jazzstack

Copy link
Copy Markdown
Contributor

Summary

Adds support for the Razer Cobra wired mouse (1532:00a3) through a new dedicated driver in @openmouse/protocol (RazerCobraHidClient), plus the control wiring, device art, a preview fixture, and the CI install fixes needed to fetch the protocol package.

Hardware-verified by an owner of the device. The confirmed command table lives in docs/razer-testing.md in the protocol repo.

What's included

  • Protocol — dedicated RazerCobraHidClient in src/drivers/razer/cobra-hid.ts. Covers effects and colour only, no brightness. Reads answer on transaction id 0xff; extended-matrix effect writes answer on 0x1f, including breathing (OpenRazer lists breathing on 0x3f, which the hardware does not match). DPI 100–8500, polling 125/500/1000 Hz, single Logo LED zone.
  • Control wiringRazerCobraHidClient is accepted and activated like the other Razer clients.
  • Device art1532:00a3 maps to /devices/razer-cobra.webp.
  • Preview fixture?preview=razer-cobra renders the Cobra status.
  • Build fixes — the protocol git dependency is fetched over HTTPS and npm's allow-git policy is set to all, so CI (Vercel) can install the protocol package under npm 11's security defaults.

Base commits

This branch also carries four earlier commits from dev (custom colour picker tab, viper mini device art, bundle budget raise) that the Cobra work sits on top of.

Testing

  • Protocol: 275 tests pass, including 6 new Cobra tests.
  • App: tsc --noEmit, vite build, and all 32 tests pass.
  • Verified on hardware: DPI read/write with persistence, polling read/write at 125/500/1000 Hz, and every effect mode on 0x1f (including breathing).

@jazzstack

Copy link
Copy Markdown
ContributorAuthor

verified on real hardware by discord user thomas shelby (735169170907594784) and ticket id link : https://discordapp.com/channels/1531814042421952644/1536377385589407806

Screenshot_2026-08-10_233526Screenshot_2026-08-10_233535

# Conflicts:
#	build/check-bundle-size.ts
#	src/ui/device-images.ts
@snekxs
snekxs merged commit 0b2cbda into OpenMouse-Project:devAug 11, 2026
2 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jazzstack@snekxs