Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to communicate with keyboard without detaching from kernel ? #4

Open
avilleret opened this issue Mar 14, 2019 · 7 comments

Comments

@avilleret
Copy link

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 :-)

@martin31821
Copy link
Owner

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)...

@avilleret
Copy link
Author

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)

@martin31821
Copy link
Owner

sure, any PRs are appreciated. I just dumped the code here in case it's useful for anyone.

@guillaumesalagnac
Copy link

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.

@avilleret
Copy link
Author

yes please @guillaumesalagnac share your work !
I'm working on a kernel module today

@guillaumesalagnac
Copy link

there you go: https://github.com/guillaumesalagnac/fusion-kbd-controller

A kernel module would indeed be awesome !

@yurikhan
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants