Cyborg V.7 macro keys on Linux

I bumped into some scripts recently that nicely abuse usbmon to watch actions on USB devices and do stuff with it. And guess what, this works nicely to get the Cyborg V.7 macro keys to work under Linux! 


I wrote a little bash script (cyborgMacros.sh) which monitors all usb traffic for a certain pattern and if found sends out a Control+F1 to Control+F12 mapping to Xorg. Which allows you to map the macro keys in pretty much any application.


Unfortunately in order to actually monitor USB you'll need root access so you're probably best of to sudo the script on login. Just add the following line to /etc/sudoers:

user ALL=NOPASSWD:/path/to/cyborgMacros


Another shortcoming of the script is the fact that it monitors "usb device 0" which basically means all USB traffic is passed through this script (I'm guessing this could have quite a performance hit). This is just because I've been too lazy to add some keyboard detection in it... hopefully I'll get around to fix it sometime. 


Lastly it requires xdotool to be able to send the keyboard events to Xorg. I think it's included in most distro's but if not you might need to grab it yourself. 


Long story short, just start the script as root and off you go!

Comments (0)

Captcha

XHTML 1.1 valid CSS 3.0 valid JavaScript 1.6 valid Vivaldi valid Os-linux valid Ws-apache valid Php valid Jas valid