fusion-kbd-controller
fusion-kbd-controller copied to clipboard
Is there a way to communicate with keyboard without detaching from kernel ?
Hi,
first of all: thanks a lot for this work, I was looking for such a tool since I bought my Aero 15 more than a year ago.
I'm working on improving le CLI interface and I'm wondering if there is a way to communicate with keyboard without detaching it from kernel ? There is a bottleneck here because claiming interface takes about 200ms. It's fast but not enough for what I'm trying to achieve :-) I want my keyboard color to change when I'm pressing a mod key to show i3wm active shortcut. And I can execute the shortcut in less than 200ms :-)
There is always the possibility to write a kernel module to control the LEDs, but I have never done this and libUSB was the most convenient solution for me to get results quickly. Maybe one could just write a new backend for the linux kernel RGB api... (http://lkml.iu.edu/hypermail/linux/kernel/1810.2/05683.html)...
indeed, thanks I'll look into it
btw, are you open to PR to improve CLI ? my fork is here : https://github.com/avilleret/fusion-kbd-controller (work still in progress)
sure, any PRs are appreciated. I just dumped the code here in case it's useful for anyone.
It is very much useful indeed. (in other words: thanks heaps for this invaluable tool).
I also have a few trivial improvements on the CLI lying around, it seems that I should push them on github to avoid duplicate efforts.
yes please @guillaumesalagnac share your work ! I'm working on a kernel module today
there you go: https://github.com/guillaumesalagnac/fusion-kbd-controller
A kernel module would indeed be awesome !
There is no need to unbind, and no need for a kernel module, if you go through hidraw, or, a level higher, through libhidapi-hidraw. As a proof of concept, I threw together a Python module that can also be used as a CLI tool.