Skip to content

feat(razer): offer button mapping over the Viper V3 Pro's wired connection - #26

Open
Pochiiko wants to merge 1 commit into
OpenMouse-Project:mainfrom
Pochiiko:feat/vv3p-wired-button-mapping
Open

feat(razer): offer button mapping over the Viper V3 Pro's wired connection#26
Pochiiko wants to merge 1 commit into
OpenMouse-Project:mainfrom
Pochiiko:feat/vv3p-wired-button-mapping

Conversation

@Pochiiko

Copy link
Copy Markdown
Contributor

Class 0x02 was gated to the receiver (0x00c1) because it had only ever been exercised there. It is now confirmed on the cable (0x00c0) too, so the flag moves to the shared VIPER_V3_PRO preset and the comment explaining the cable's exclusion goes with it.

Verified on hardware, dongle unplugged and Synapse closed:

  • Mouse Button 4, set to Right Click over the receiver, read back as Right Click over the cable. Mappings live in device memory, so both links see one stored state.
  • MB4 disabled over the cable, pressed, physically dead, restored -- setButtonMapping.
  • Scroll Up disabled over the cable, scrolled, physically dead, restored -- setToggleControl, a separate codec path.
  • Verified that the applied changes stay persistent after a power cycle on the mouse.

The cross-transport read is the check that matters, because the failure mode here is silent rather than loud. razerDecodeButtonMapping reads type=0x00, len=0x00, value=0x00 as "Disabled", so a transport that does not implement the class answers all-zero and produces a full, ordinary set of controls that every read reports as Disabled and every write appears to accept. readButtonMappings' null-collapse cannot catch that, because the dict comes back populated. Only a value that all-zero cannot forge distinguishes the two.

Add the allowlist test the other hardware-gated capabilities already have -- liftOff and asymmetricLiftOff each pin their product ids, and buttonMapping had no equivalent -- and record on the field itself that the gate is per connection, not per model.

No change is needed on the consumer side: availability is computed from status.razerButtonMappings and never looks at the transport.

Class 0x02 was gated to the receiver (0x00c1) because it had only ever
been exercised there. It is now confirmed on the cable (0x00c0) too, so
the flag moves to the shared VIPER_V3_PRO preset and the comment
explaining the cable's exclusion goes with it.

Verified on hardware, dongle unplugged and Synapse closed:

- Mouse Button 4, set to Right Click over the receiver, read back as
  Right Click over the cable. Mappings live in device memory, so both
  links see one stored state.
- MB4 disabled over the cable, pressed, physically dead, restored --
  setButtonMapping.
- Scroll Up disabled over the cable, scrolled, physically dead,
  restored -- setToggleControl, a separate codec path.

The cross-transport read is the check that matters, because the failure
mode here is silent rather than loud. razerDecodeButtonMapping reads
type=0x00, len=0x00, value=0x00 as "Disabled", so a transport that does
not implement the class answers all-zero and produces a full, ordinary
set of controls that every read reports as Disabled and every write
appears to accept. readButtonMappings' null-collapse cannot catch that,
because the dict comes back populated. Only a value that all-zero cannot
forge distinguishes the two.

Add the allowlist test the other hardware-gated capabilities already
have -- liftOff and asymmetricLiftOff each pin their product ids, and
buttonMapping had no equivalent -- and record on the field itself that
the gate is per connection, not per model.

No change is needed on the consumer side: availability is computed from
status.razerButtonMappings and never looks at the transport.
@Pochiiko
Pochiiko force-pushed the feat/vv3p-wired-button-mapping branch from 35ccb8c to 06997e4 Compare August 17, 2026 05:07
Sign up for free to 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.

1 participant