-
Notifications
You must be signed in to change notification settings - Fork 14
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
x52d reverse scroll wheel direction #45
Comments
Another note related to the scroll wheel: It scrolls way too many lines at a time. It would be nice if that could also be configured. When I test it in a browser (Firefox) it seems to scroll almost a full screen at a time. |
It shouldn't be too hard to add a reverse scroll option, but the scroll speed issue is bugging me. The virtual mouse only sends a scroll value of 1 or -1, I don't know if there's something else in the desktop input libraries or the kernel that's translating it into a super large jump. |
The scroll step seems to be application dependant, but is larger than my normal mouse always:
I don't know how to debug this further, but if you can suggest some commands to run I'm willing to try. DE: KDE |
That is extremely weird. Can you run x52evtest and check what the output is when you scroll? You should get a single pair of events for each scroll. |
I do indeed get a single pair of events for each scroll in |
I don't see any problem with a test program on Ubuntu 22.04 with Wayland. I don't think I can be of much help here, since I'm not familiar with how the input subsystem works. Can you try with the following test program and let me know if you see the same kind of behavior?
Build it with |
First: I'm on X11. That may indeed make a difference if you are on Wayland ("!/#% nvidia). Ignore this, realise this was irrelevant. Second, whatever I do (even if I don't scroll) it just prints the following, one line every second or so: $ ./mouse-scroll-test
Writing scroll down event 0
Writing scroll down event 1
Writing scroll down event 2
Writing scroll down event 3
Writing scroll down event 4
Writing scroll down event 5
Writing scroll down event 6
Writing scroll down event 7
Writing scroll down event 8
Writing scroll down event 9 Scrolling with either the X52 or my mouse does not affect the output in any way. EDIT: Ah, now I realise this is supposed to generate scroll events. EDIT2: It seems to be small steps in Firefox. They are still much smaller than the steps from x52d (not sure if it is the same size as my mouse though)! In xev it is one pair of events per printed line. |
Aha! I think I figured out why you are seeing this issue - the wheel event is sent anytime there is a new report read from the hardware. From your comment in #44, it seems like there is some hardware issue that is causing noise when you are reporting a change due to the your twist axis. The report_wheel method in x52d simply checks what the current value is, and not what the previous value is. So, you are possibly receiving multiple reports when the wheel is getting updated. I'll push a fix for this shortly. |
That is very possible. The noise in question is very high frequency, flickering many times per second. |
This change adds a ReverseScroll parameter to the configuration, which if set, will change the direction of the scroll wheel of the virtual mouse. Github-Issue: #45
Can you give the code in the |
Unfortunately it doesn't seem to work quite right. It scrolls one step in either direction then there are no further events at all until I reverse direction of the scrolling. EDIT: No further scroll events that is. |
Dang, I thought that would fix it. Can you capture some event logs from your joystick using This should be in the evemu-tools package. Please follow the instructions on the manpage. |
On Arch Linux it is apparently in the "evemu" package. Unfortunately I have issues getting this to work (maybe?): $ evemu-record /dev/input/js0 scrolling.log
error: this device is grabbed and I cannot record events
see the evemu-record man page for more information
$ man evemu-record
<read>
$ fuser -v /dev/input/js0
$ So I don't know what is grabbing it. However I found that |
I've pushed another commit, which may fix the single event issue. Unfortunately, I don't have access to my joystick right now, so I can't test it myself. Please let me know if this works. |
Unfortunately there was no change in behaviour with the latest patch |
OK, I'll have to look into this later. Did you get a chance to play with the |
I did not get around to testing that. I will check it out and report back. |
Sorry it took a few days to get around to testing this. Yes the reverse scroll commit works. |
This change adds a ReverseScroll parameter to the configuration, which if set, will change the direction of the scroll wheel of the virtual mouse. Github-Issue: #45
@VorpalBlade, thanks for the confirmation. I've merged the reverse scroll commit to master. I'll close this issue, and track the multiple reports bug in #46 |
Is your feature request related to a problem? Please describe.
The scroll wheel on the X52 Pro is mounted on the backside of the throttle. When using x52d pulling my finger back (as I would on a normal mouse wheel to scroll down) for some reason scrolls up, and vice versa.
I cannot see an option in x52d to reverse the scroll direction.
Describe the solution you'd like
An option in the config file to select scrolling direction.
Describe alternatives you've considered
I tried changing the scrolling direction in KDE settings, but that only affects my real mouse, not the X52.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: