Discussion: modified hid library
errnoh opened this issue · comments
Just thought I'd ask here why you ended up customizing the hid library and were there some blockers in the libraries that were currently available (mainly in zserge/hid, as all others seem to use cgo)? I'm considering writing Windows support for https://github.com/zserge/hid and if I do that and it gets merged it would be nice if it would enable your library to work with Windows as well.
I modified the hid library because it had some issues and didn't provide exactly what I needed, I can't remember all of it off the top of my head, but if you diff the changes you can see. One I can remember is editing the ioctl
function to not use a bytes#Buffer which was causing weird issues when reading from the device (which is used to listen for button presses).
My goal was to avoid using CGO at all costs as it's can be resource heavy and makes distribution of binaries more difficult, the one downside is that it makes the library not compatible with other operating systems, but I built this for the sole purpose of use on Linux, not as a way to avoid the official software.
If you wish to add Windows support, I'd be more than happy to merge it assuming it doesn't increase complexity or require the use of CGO.