Bug 91983

Summary: Support for extra Macro buttons on Razer keyboard
Product: Wayland Reporter: Bernardo Donadio <bcdonadio>
Component: libinputAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: medium CC: bcdonadio, peter.hutterer
Version: 1.5.0   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patched python razer keyboard macro keys activator script

Description Bernardo Donadio 2015-09-11 19:51:41 UTC
Created attachment 118220 [details]
Patched python razer keyboard macro keys activator script

In order to enable the extra Macro buttons, for some unknown proprietary reason, the Razer keyboards require some USB magic messages to be sent in order for them to work (otherwise pressing the macro keys send no keycode to the system).

Sergey from superuser.com already developed the solution in python, but it would be nice if this solution were already baked in libinput, so the keys can work out-of-the-box.

The original Sergey's code can be found at the following link: http://superuser.com/a/474595/8647

I'm attaching also a modified version (that I found on the internet some time ago, god knows where...) which also works with the newer Razer keyboards, like my Razer BlackWidow 2014 RZ03-0039 (USB VID:PID 1532:011b).

Furthermore, it would also be needed some key remapping, since this keyboard have the M[1-5] macro keys, but the M1 key is recognized as the "Tools" key (the M[2-5] are recognized as Launch[5-8]). This breaks some assumptions with the Gnome shortcuts, rendering the M1 key unusable.
Comment 1 Peter Hutterer 2015-09-17 22:47:38 UTC
sorry, this isn't really a libinput issue. We just take the device and use it, if it requires a specific setup that should be done before libinput kicks in. If it's like a firmware that should be loaded it's probably best to put a udev callout in for that.
Comment 2 Darren Salt 2016-05-03 20:20:51 UTC
In case anybody else stumbles across this, I have a .deb which works for this particular model:

http://www.moreofthesa.me.uk/razer/

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.