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

mouse3 and mouse4 not working #37

Open
DevXaer0 opened this issue Sep 11, 2023 · 6 comments
Open

mouse3 and mouse4 not working #37

DevXaer0 opened this issue Sep 11, 2023 · 6 comments

Comments

@DevXaer0
Copy link

DevXaer0 commented Sep 11, 2023

Hey, thanks for creating this. Very helpful for me as I use a trackball and prefer mouse acceleration for games.

However, I have an issue. Middle mouse and the side button (different physical layout on the Slimblade, but still) don't work. The acceleration, left click, right click, and scrolling seem to be fully functional. Xev seems to recognize those inputs, but not mouse3 and mouse4 using this driver. Mouse3 and mouse4 ARE recognized by xev when not using the driver. Also, I have the following errors in dmesg:

First float-trap triggered. Should very very rarely happen, if at all
Final float-trap triggered. This should NEVER happen!

Not entirely sure what they mean, but I presume my config has incorrect float values or something. I'm on Manjaro i3 and am using a Kensington Slimblade... not sure what else I should provide, but do let me know. If there's a solution already then a point in the right direction would be greatly appreciated.

@systemofapwne
Copy link
Owner

systemofapwne commented Sep 17, 2023

The floattraps can be ignored.
I guess, something is off with processing the buttons on your specific device. I need more info on that, especially on the USB descriptors: https://github.com/systemofapwne/leetmouse/tree/master/debug

Edit:
According on the USB Descriptor parser, that I wrote here, I suspect, that your mouse/trackball reports multiple "button" sections in the USB descriptor, while my parser only uses the first one it can find (for simplicity reasons).

@DevXaer0
Copy link
Author

Here's the output of lsusb -vd, and here's the translated output of usbhid-dump.

@systemofapwne
Copy link
Owner

Thank you. Can you please also send the total dump of usbhid-dump without parsing it, so I can be sure, that I did not miss anything.

For me, the USB descriptor of your mouse looks OKish but yet different to, what I would have expected:

image

It seems to encode button presses in two bits only. So that would only allow for two buttons then. Most pointer devices however use 8 bits to encode various button presses.
What I find curious is, that there is an additional data-field after the button of size 6 bits. Together with the 2 bits before, we are back to "standard".
I expect, that your missing buttons are encoded in here.

@DevXaer0
Copy link
Author

Sure thing.

@systemofapwne
Copy link
Owner

And I assume, this is the only descriptor coming from your trackball? Some devices report multiple descriptors. If it is the only one, then I guess my assumption about 2+6 = 8 bits hold.

@DevXaer0
Copy link
Author

DevXaer0 commented Sep 19, 2023

I was curious about that as well, the steelseries example you showed has multiple descriptor sections in the output whereas this does not. But yes, that is the only descriptor I receive from usbhid-dump.

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

2 participants