WARNING Do not use this software by itself. Feel free to base your own scripts on it, but this has been specifically written for my requirements and makes some assumptions that may brick your keyboard.
Huge thanks to the Nudelta project for their work on reverse-engineering the USB protocol: https://github.com/donn/nudelta