You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Razer] Viper Mini (1532:008a): no button remapping — legacy-group button command never captured #342
Reported on the support forum: a Viper Mini shows Overview / Performance / Lighting / Advanced but no Buttons tab, so its side buttons cannot be rebound.
RazerViperMiniHidClient (src/drivers/razer/viper-mini-hid.ts) is a dedicated client for the legacy protocol group — transaction id 0xff for DPI/polling/firmware/serial, 0x3f for lighting writes — and it exposes only those. It never reports razerButtonMappings, so the Buttons section in gpui/js/controls.ts (razerAndEgg) has nothing to render. 0x008a is also deliberately absent from RAZER_PRODUCTS (razer/devices.test.ts:309 asserts this), so the generic RazerHidClient button path never applies either.
What is unknown is whether this firmware group has a button-mapping command at all. RAZER_BUTTON_CONTROLS and razerSetButtonMappingCommand are verified against the Viper V3 Pro family under transaction id 0x1f; whether the same command class answers on a Viper Mini (firmware 1.3, reported by the device) has never been tested.
To close this: one Synapse capture of a single button remap on a Viper Mini — USBPcap + Wireshark on Windows, or usbmon on Linux — which gives the command class, payload layout and transaction id to compare against the 0x1f path. Then either extend RazerViperMiniHidClient with the verified command or add 0x008a to the generic map if the frames match.
A forum user on Arch asked for this and can run the capture if we give them the recipe; no Viper Mini hardware in hand.
A recipe the Arch user can follow without a Windows machine, since Synapse can run in a Windows VM and the capture happens on the Linux host:
lsusb to note the bus and device number of the Viper Mini (1532:008a).
sudo modprobe usbmon, then start Wireshark (or tshark -i usbmonN -w viper.pcapng) on that bus before the mouse is passed to the VM, so the descriptors are in the file too.
In virt-manager add the mouse as a USB Host Device (VirtualBox: a USB filter), install Synapse inside Windows and let it find the mouse.
Wait about 5 seconds idle, then remap one side button to the keyboard key A and save. Wait 5 seconds, remap the same button to B, wait, then set it back to default. Writing down the clock time of each step helps a lot, because Synapse keeps polling DPI and battery in between.
Stop the capture, filter on usb.device_address == N && usb.bmRequestType == 0x21 (N from step 1, it changes on every replug or VM handover) and export only the displayed packets.
What to look for in those SET_REPORTs: they are the usual 90-byte Razer feature reports, so byte 1 is the transaction id, bytes 6 and 7 are command class and command id, the arguments start at byte 8 and byte 88 is the XOR of bytes 2 to 87. The three remaps should give three reports that differ only in a couple of argument bytes, one of them going 0x04 then 0x05 (HID usages for A and B), which pins down the button id and the action field. If byte 1 is 0xff there, the command lives in the legacy group and RazerViperMiniHidClient can be extended; if it is 0x1f and class/id match the V3 Pro command, adding 0x008a to the generic path is the simpler fix.
Before posting the file, check the GET_DESCRIPTOR string replies, the serial can be in there.
Verified on hardware — Razer Viper Mini (1532:008a), firmware v1.3, wired, Linux (Arch).
No Synapse capture was needed after all: the mouse answers the keymap class directly, so this was read and written through userspace hidraw with opensynapse (same 90-byte feature report framing).
Transport
Interface 0, transaction id 0x1f — the same id the Viper V3 Pro family uses, not the 0xff/0x3f pair this model's client was built around. 0x00/0x81 returned 0103 (v1.3) and every 0x02 command below answered under 0x1f.
Read
0x02/0x8c, args [profile, button, layer], data size 0x0a. The reply echoes the three args, then the action:
So the action payload is [type, len, payload…]: 01 01 nn = mouse button, 02 02 mod usage = keyboard key, 0c 01 01 = hypershift, 00 00 = disabled. That is the same encoding the verified 0x1f path already uses.
Side buttons are 0x04/0x05, i.e. the same indices as RAZER_BUTTON_CONTROL_INDEX's mouse4/mouse5 — not a separate legacy range. The DPI button ships as a plain keyboard action (type 0x02, usage 0x73 = F24), not as a 0x06 sensitivity command, so it is an ordinary remappable slot.
Write — confirmed physically
Writes went to profile 1 (persistent; profile 0 is the live copy lost on unplug), then the mouse was switched onto it:
opensynapse set btn-0x60 hypershift --profile 1 # DPI → Hypershift modifier
opensynapse set back key:f13 --profile 1 --layer hypershift # back, Hypershift layer
opensynapse set forward key:f14 --profile 1 --layer hypershift # forward, Hypershift layer
opensynapse set btn-0x60 disabled --profile 1 --layer hypershift # no recursion on layer 1
Reading the profile back returned exactly those four values, and holding the DPI button while pressing the side buttons produced real F13 / F14 key events in wev on Wayland — so the layer argument, the hypershift action and the keyboard-key encoding are all confirmed on this firmware, not merely accepted by a read-back.
What this implies for the driver
The wire format on 0x008a looks identical to the verified 0x1f path, so the likely fix is either adding 0x008a to the generic map or giving RazerViperMiniHidClient the same button methods under tid 0x1f — not a new protocol family.
Two things to settle before shipping support:
Only one profile exists (0x05/0x80 → 01, active 01), so the args' profile byte needs a decision: the write path here used profile 1, reads answered on both 0 and 1.
The DPI button is a keyboard-action slot, so it belongs with RazerButtonControl-style cross-assignable handling rather than the narrower RazerToggleControl treatment.
Still unexplained: 0x02/0x82 → 081c081c, which has no meaning in either shipped protocol file.
Hardware and testing by a forum user (sapphired.) who reported the missing Buttons tab.
Hardware pass complete on the reporter's Viper Mini (1532:008a, firmware v1.3, Arch, WebHID):
Buttons card renders with Left Click locked and the other three editable.
Mouse-button remapping writes and persists: Right Click → Mouse Button 5, Mouse Button 5 → Mouse Button 5, all confirmed by read-back.
Keyboard keys work end to end: Mouse Button 5 → Ctrl+C writes 02 02 01 06, reads back identically, and the binding is live. A Q assignment (02 02 00 14) was also verified.
No errors in the final session (lastError: null); the two stale-reply failures earlier in the day are the ones fixed in this branch.
One thing the logs caught that was not a protocol problem: the app's razerButtonClient() returned only the base RazerHidClient, so the card rendered but every dropdown staged nothing — fixed in OpenMouse-Project/openmouse#1788 along with the key picker.
Implementation is in #348's branch; the panel half is #1788. Keeping this open until both merge.
Activity
emirmrkaljevic commentedon Dec 4, 2026
A recipe the Arch user can follow without a Windows machine, since Synapse can run in a Windows VM and the capture happens on the Linux host:
lsusbto note the bus and device number of the Viper Mini (1532:008a).sudo modprobe usbmon, then start Wireshark (ortshark -i usbmonN -w viper.pcapng) on that bus before the mouse is passed to the VM, so the descriptors are in the file too.usb.device_address == N && usb.bmRequestType == 0x21(N from step 1, it changes on every replug or VM handover) and export only the displayed packets.What to look for in those SET_REPORTs: they are the usual 90-byte Razer feature reports, so byte 1 is the transaction id, bytes 6 and 7 are command class and command id, the arguments start at byte 8 and byte 88 is the XOR of bytes 2 to 87. The three remaps should give three reports that differ only in a couple of argument bytes, one of them going 0x04 then 0x05 (HID usages for A and B), which pins down the button id and the action field. If byte 1 is 0xff there, the command lives in the legacy group and
RazerViperMiniHidClientcan be extended; if it is 0x1f and class/id match the V3 Pro command, adding 0x008a to the generic path is the simpler fix.Before posting the file, check the GET_DESCRIPTOR string replies, the serial can be in there.
I wrote the VM route up in more detail for usb-rea, a tool I built for this kind of capture: https://github.com/emirmrkaljevic/usb-rea/blob/main/docs/capture-vm.md
snekxs commentedon Dec 4, 2026
Verified on hardware — Razer Viper Mini (
1532:008a), firmware v1.3, wired, Linux (Arch).No Synapse capture was needed after all: the mouse answers the keymap class directly, so this was read and written through userspace hidraw with
opensynapse(same 90-byte feature report framing).Transport
Interface 0, transaction id
0x1f— the same id the Viper V3 Pro family uses, not the0xff/0x3fpair this model's client was built around.0x00/0x81returned0103(v1.3) and every0x02command below answered under0x1f.Read
0x02/0x8c, args[profile, button, layer], data size0x0a. The reply echoes the three args, then the action:So the action payload is
[type, len, payload…]:01 01 nn= mouse button,02 02 mod usage= keyboard key,0c 01 01= hypershift,00 00= disabled. That is the same encoding the verified0x1fpath already uses.Button ids
0x02/0x84returns08 01 02 03 04 05 60 09 0a— eight buttons:0x010x020x030x040x050x600x090x0aSide buttons are
0x04/0x05, i.e. the same indices asRAZER_BUTTON_CONTROL_INDEX'smouse4/mouse5— not a separate legacy range. The DPI button ships as a plain keyboard action (type 0x02, usage0x73= F24), not as a0x06sensitivity command, so it is an ordinary remappable slot.Write — confirmed physically
Writes went to profile 1 (persistent; profile 0 is the live copy lost on unplug), then the mouse was switched onto it:
Reading the profile back returned exactly those four values, and holding the DPI button while pressing the side buttons produced real
F13/F14key events inwevon Wayland — so the layer argument, the hypershift action and the keyboard-key encoding are all confirmed on this firmware, not merely accepted by a read-back.What this implies for the driver
The wire format on
0x008alooks identical to the verified0x1fpath, so the likely fix is either adding0x008ato the generic map or givingRazerViperMiniHidClientthe same button methods under tid0x1f— not a new protocol family.Two things to settle before shipping support:
0x05/0x80→01, active01), so the args' profile byte needs a decision: the write path here used profile1, reads answered on both0and1.RazerButtonControl-style cross-assignable handling rather than the narrowerRazerToggleControltreatment.Still unexplained:
0x02/0x82→081c081c, which has no meaning in either shipped protocol file.Hardware and testing by a forum user (
sapphired.) who reported the missing Buttons tab.sapphired18 commentedon Dec 4, 2026
Yes, this is me the same tester. I really need button remapping and be the hardware verifier
snekxs commentedon Dec 4, 2026
Hardware pass complete on the reporter's Viper Mini (
1532:008a, firmware v1.3, Arch, WebHID):Ctrl+Cwrites02 02 01 06, reads back identically, and the binding is live. AQassignment (02 02 00 14) was also verified.lastError: null); the two stale-reply failures earlier in the day are the ones fixed in this branch.One thing the logs caught that was not a protocol problem: the app's
razerButtonClient()returned only the baseRazerHidClient, so the card rendered but every dropdown staged nothing — fixed in OpenMouse-Project/openmouse#1788 along with the key picker.Implementation is in #348's branch; the panel half is #1788. Keeping this open until both merge.