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

FN key + soft helper #3

Closed
Catvert opened this issue Apr 2, 2019 · 7 comments
Closed

FN key + soft helper #3

Catvert opened this issue Apr 2, 2019 · 7 comments

Comments

@Catvert
Copy link

Catvert commented Apr 2, 2019

Hello,
First of all, thanks for your amazing work !
I never thought I'd be able to customize my roccat keyboard on Linux since the only linux developer left the Roccat box.

That's it, everything seems to work correctly, the only problem I have is the inability to change the color of my FN key. No evdev ID is displayed in verbose mode when I press this key.

I'm making a little software (in order to practice the Rust language) to easily configure its roccat keyboard using your software in backend. For the moment, it allows to store the color assigned to each key (in a configuration file), the effect mode (wave/impact), make key groups to assign a specific color to this group(like change all colors for letters in one command)...
I plan to add profile support later on, maybe a graphical interface and of course code enhancement.
If you are interested, here is the link to the repo: https://github.com/Catvert/roccat-vulcan-helper

Thank you for your help,
Arno.

@duncanthrax
Copy link
Owner

Hi Arno, the FN key does not seem to produce a standard HID USB report - I don't see activity on the USB HID device when this button is pressed. The swarm software on windows can query it - maybe it needs to be polled.

If you want to write effects in a higher-level language, it may be practical to expose the key color map as a memory-mapped file (like SHM) from a daemon written in C. The daemon can push the color map to the keyboard periodically, and the higher-level software can just write color information to the memmap. I had such a model working previously, but then settled to do everything in C instead.

@Catvert
Copy link
Author

Catvert commented Apr 3, 2019

Ok !
Thank you for the information.

@Catvert Catvert closed this as completed Apr 3, 2019
@SpiritCroc
Copy link
Contributor

I'm currently playing around with this project, I added support for at least setting static color to the FN key with SpiritCroc@08b34ea

Apart from that, I added the functionality to read commands to set static colors from a named pipe so I can control my keyboard from other scripts.

Btw, as soon as I start roccat-vulcan, my volume and media control buttons stop sending keycodes it seems, is this known/is there a known workaround?

Thanks for your work!

@duncanthrax
Copy link
Owner

@SpiritCroc: Please send a PR when you're done. I didn't notice the media keys being inactive since I never used them. It looks like the media/volume keys register as a separate HID device which simply disappears after I send the init sequence. It might also be due to the fact that I only open two of the four (five?) exposed HID interfaces. Maybe then the HW shuts down the others. I'll experiment a bit to see if I can make the keys work again.

@SpiritCroc
Copy link
Contributor

@duncanthrax will do; thanks for looking into it!

@duncanthrax
Copy link
Owner

FYI, I found the reason for the disappearing media key device. It's the same device that is used to send the init sequence. I open it with hidapi-libusb, which disconnects it from the kernel driver. Hence, it disappears. Unfortunately, hidapi-libusb does not reconnect the kernel driver even when you close the device. A PR to fix this has been open for a year (signal11/hidapi#393). My alternative is to use native hidraw for the control/media device and use hidapi-libusb only for the LED device. I'll probably do that.

@SpiritCroc
Copy link
Contributor

@duncanthrax interestingly, using the patch you linked and closing the ctrl device after the init sequence, I indeed get back working volume control (which is great), but the play/pause etc. keys that you access with the FN key still stopped working for me as soon as roccat-vulcan is started...

SpiritCroc added a commit to SpiritCroc/roccat-vulcan that referenced this issue Apr 7, 2019
Fixes volume keys when using patched hidapi, see
duncanthrax#3 (comment)
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

3 participants