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] button mappings can only be mouse buttons — keyboard keys verified working on the Viper Mini #349
Follow-up to #342, from the same reporter's Viper Mini (1532:008a, firmware v1.3).
#342 closed the gap where the Viper Mini had no Buttons tab at all. It now reports the four RazerButtonControls and they remap to mouse buttons — but RAZER_BUTTON_MAPPINGS only contains Left Click, Right Click, Mouse Button 4, Mouse Button 5 and Disabled, so a user cannot assign a keyboard key to a side button. That is the actual ask from the report: "I can't bind keys."
The firmware already does it
Measured on the reporter's mouse, read back through 0x02/0x8c with [profile, control, layer]:
00 60 00 | 02 02 00 73 DPI button, Standard layer → keyboard key, no modifier, usage 0x73 (F24)
and a write of the same shape on the Hypershift layer took effect physically: back/forward set to keyboard actions produced real F13/F14 key events in wev, confirmed after a replug. So the encoding is verified on hardware — type=0x02, len=0x02, <modifier byte>, <HID usage>, with the same modifier bits the driver already uses elsewhere (ctrl 0x01, shift 0x02, alt 0x04, meta 0x08, …).
What it would take
Codec: widen the mapping type beyond the five mouse labels. Something like a RazerButtonMapping that can also be { mods, usage }, encoding to [0x02, 0x02, mods, usage]; the decoder needs the mirror so a keyboard assignment reads back as itself rather than null (today it returns null for type 0x02, which is why an assigned key would silently vanish from the panel).
Driver: no change — setButtonMapping already ships whatever the codec builds, and this firmware confirms by read-back.
App: the dropdown would need a "Keyboard shortcut" entry plus a key-capture row, which is the bulk of the work and lives in openmouse.
Open questions before anyone builds it
Whether the read-back for a keyboard mapping on other Razer models matches this one — only this Viper Mini has been checked.
Whether every HID usage in the consumer range is accepted, or the firmware rejects some, which the write silently storing anything makes hard to detect without a press test.
Protocol credit for the capture: the reporter (sapphired.) on Arch.
Implemented and verified on hardware in this reporter's Viper Mini: keyboard mappings write [profile, control, layer, 0x02, 0x02, mods, usage], read back as themselves (so a key shows in the panel instead of vanishing), and are labelled Ctrl+F13-style. Codec and driver are in #348; the key-capture row in the panel is OpenMouse-Project/openmouse#1788. Confirmed live: Mouse Button 5 → Ctrl+C and → Q both stored and stayed after replug.
Activity
snekxs commentedon Dec 4, 2026
Implemented and verified on hardware in this reporter's Viper Mini: keyboard mappings write
[profile, control, layer, 0x02, 0x02, mods, usage], read back as themselves (so a key shows in the panel instead of vanishing), and are labelledCtrl+F13-style. Codec and driver are in #348; the key-capture row in the panel is OpenMouse-Project/openmouse#1788. Confirmed live: Mouse Button 5 → Ctrl+C and → Q both stored and stayed after replug.