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

Analog support #1868

Closed
wants to merge 2 commits into from
Closed

Analog support #1868

wants to merge 2 commits into from

Conversation

meeuw
Copy link
Contributor

@meeuw meeuw commented Jul 31, 2022

Support Huntsman Mini Analog "driver mode" support where keys only emit their analog values.

Notes:

  • There are not enough ABS_* codes for all of the keyboard buttons (so I reused the same codes for duplicate keys)
  • Ripple LED effect doesn't work
  • I'm not so sure about using the O(n) find_translation function, might be better to rewrite to switch/case?
  • Sometimes keys don't emit a value lower than the threshold when "key up" and the key get's "stuck"
  • Both key and absolute events are emitted
  • Should "analog_threshold" be mapped to the mouse interface sysfs directory?

I understood that this might be out of scope for openrazer and the code is very specific to this keyboard. I hope you can help me find a way to collaborate on Razer Analog keyboards.

Partially fixes #1579

@z3ntu
Copy link
Member

z3ntu commented Nov 20, 2022

Sorry, forgot about this PR. I honestly really don't want to add such functionality to the openrazer driver. Maybe you can talk with the linux-input people upstream and try and find a good solution for this, that isn't Razer-specific (well, has a Razer-specific implementation of course but otherwise uses some sort of new standard that the input maintainers like)

@meeuw
Copy link
Contributor Author

meeuw commented Nov 22, 2022

Hi @z3ntu I agree, in the meantime I've created a user-mode implementation (using hidraw) which fits my needs.

Linux input isn't ready for so many analog buttons, I don't like the hardcoded keyboard map and the implementation in this PR suffers from stuck keys.

I'm planning to put my focus on hid_razer (in the kernel) and see if I can add razer-analog support there.

@meeuw meeuw closed this Nov 22, 2022
@Quackdoc
Copy link

@meeuw do you have any updates on upstream work, and if not can you share the implementation? I have a tartarus pro which also uses analog keys and would like to do something similar to at least get it usable for what I need

@meeuw
Copy link
Contributor Author

meeuw commented Nov 12, 2023

Hi @Quackdoc, sure I just published my project here:

https://github.com/meeuw/razer-analog

I'm not sure if the protocol similar to the huntsman analog keyboard, if not I'd recommend to do some usb monitoring (using wireshark) on the (windows) driver.

I've submitted a simple patch for hid_razer but it got ignored everytime I posted it so I gave up on it.

@Quackdoc
Copy link

ah thats a shame about the patch being ignored. I wonder if there is an irc channel the devs hang on that it could be brought up on, either way thanks for that. Analog keys help a lot with my RSI so that will be very helpful to me

Cheers!

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

Successfully merging this pull request may close these issues.

Analog key input support for Huntsman V2 Analog
3 participants