[GH-ISSUE #133] Mouse wheel distance/speed #54

Open
opened 2026-05-05 22:06:52 -06:00 by gitea-mirror · 10 comments
Owner

Originally created by @xf- on GitHub (May 15, 2024).
Original GitHub issue: https://github.com/feschber/lan-mouse/issues/133

Still broken - build the client and server on latest main commit

Server & client Wayland to Wayland

Fixed - inverted scroll direction

Originally created by @xf- on GitHub (May 15, 2024). Original GitHub issue: https://github.com/feschber/lan-mouse/issues/133 Still broken - build the client and server on latest main commit Server & client Wayland to Wayland Fixed - inverted scroll direction
Author
Owner

@feschber commented on GitHub (May 15, 2024):

What desktop? KDE?

<!-- gh-comment-id:2113661459 --> @feschber commented on GitHub (May 15, 2024): What desktop? KDE?
Author
Owner

@xf- commented on GitHub (May 16, 2024):

What desktop? KDE?

Yes on both. Like I wrote in the other issue, reverting the change helps.

<!-- gh-comment-id:2113678156 --> @xf- commented on GitHub (May 16, 2024): > What desktop? KDE? Yes on both. Like I wrote in the other [issue](https://github.com/feschber/lan-mouse/issues/115#issuecomment-2094688645), reverting the change helps.
Author
Owner

@feschber commented on GitHub (May 16, 2024):

I've tried pretty much anything but unfortunately there seems to be a bug with the KDE remote desktop portal implementation.

It might just be that they report 0 discrete scroll steps here: https://invent.kde.org/plasma/kwin/-/blame/master/src/backends/fakeinput/fakeinputbackend.cpp#L153

Basically there is two kinds of scroll events: Axis and AxisDiscrete120.
Axis is for touchpads and given in pixels, while AxisDiscrete120 is given in wheelsteps with each step being equal to 120 in value.

Now the xdg-desktop-portal-kde, which is being used here calls to the fake_input protocol:
https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/blob/master/src/remotedesktop.cpp?ref_type=heads#L322
https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/blob/master/src/waylandintegration.cpp?ref_type=heads#L414
while translating discrete scroll events into fakeinput "Axis" events which are handled in kwin:

https://invent.kde.org/plasma/kwin/-/blame/master/src/backends/fakeinput/fakeinputbackend.cpp#L132

Kwin calls to pointerAxisChanged while setting discrete Scrolling steps to 0...

So all of this seems to be fundamentally broken in KWIN itself and I fear there is nothing I can do right now to fix it.

I will however make sure to report it upstream

<!-- gh-comment-id:2113704876 --> @feschber commented on GitHub (May 16, 2024): I've tried pretty much anything but unfortunately there seems to be a bug with the KDE remote desktop portal implementation. It might just be that they report 0 discrete scroll steps here: https://invent.kde.org/plasma/kwin/-/blame/master/src/backends/fakeinput/fakeinputbackend.cpp#L153 Basically there is two kinds of scroll events: Axis and AxisDiscrete120. Axis is for touchpads and given in pixels, while AxisDiscrete120 is given in wheelsteps with each step being equal to 120 in value. Now the xdg-desktop-portal-kde, which is being used here calls to the `fake_input` protocol: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/blob/master/src/remotedesktop.cpp?ref_type=heads#L322 https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/blob/master/src/waylandintegration.cpp?ref_type=heads#L414 while translating discrete scroll events into fakeinput "Axis" events which are handled in kwin: https://invent.kde.org/plasma/kwin/-/blame/master/src/backends/fakeinput/fakeinputbackend.cpp#L132 Kwin calls to `pointerAxisChanged` while setting discrete Scrolling steps to 0... So all of this seems to be fundamentally broken in KWIN itself and I fear there is nothing I can do right now to fix it. I will however make sure to report it upstream
Author
Owner

@xf- commented on GitHub (May 16, 2024):

THX for your work. I still have my patched build and it works.

<!-- gh-comment-id:2114096295 --> @xf- commented on GitHub (May 16, 2024): THX for your work. I still have my patched build and it works.
Author
Owner

@feschber commented on GitHub (May 16, 2024):

THX for your work. I still have my patched build and it works.

It's not perfect though, right? In firefox, at least from my testing it always jumped around a bit and did not scroll smoothly (instead jumping to the next possition directly).
Regardless, I can see if I can replicate the behaviour to what your patch looks like as closely as possible.

Do you mean the state before e21ab02a6e or the current master with e21ab02a6e reverted?

<!-- gh-comment-id:2114988994 --> @feschber commented on GitHub (May 16, 2024): > THX for your work. I still have my patched build and it works. It's not perfect though, right? In firefox, at least from my testing it always jumped around a bit and did not scroll smoothly (instead jumping to the next possition directly). Regardless, I can see if I can replicate the behaviour to what your patch looks like as closely as possible. Do you mean the state before e21ab02a6e752d39ddcf73ceb9c8e5e50d014923 or the current master with e21ab02a6e752d39ddcf73ceb9c8e5e50d014923 reverted?
Author
Owner

@xf- commented on GitHub (May 18, 2024):

THX for your work. I still have my patched build and it works.

It's not perfect though, right? In firefox, at least from my testing it always jumped around a bit and did not scroll smoothly (instead jumping to the next possition directly). Regardless, I can see if I can replicate the behaviour to what your patch looks like as closely as possible.

Do you mean the state before e21ab02 or the current master with e21ab02 reverted?

Yeah, it is more or less the old function. It inverts the scrolling, but the speed is normal. So no 120 implementation. I use current release with reverting to this without 120
e21ab02a6e (diff-c04e25924525b7dc3115df2f79d08fd1eecbbd91bf16f575fcba89e885205f05L737-L772)

<!-- gh-comment-id:2118587863 --> @xf- commented on GitHub (May 18, 2024): > > THX for your work. I still have my patched build and it works. > > It's not perfect though, right? In firefox, at least from my testing it always jumped around a bit and did not scroll smoothly (instead jumping to the next possition directly). Regardless, I can see if I can replicate the behaviour to what your patch looks like as closely as possible. > > Do you mean the state before [e21ab02](https://github.com/feschber/lan-mouse/commit/e21ab02a6e752d39ddcf73ceb9c8e5e50d014923) or the current master with [e21ab02](https://github.com/feschber/lan-mouse/commit/e21ab02a6e752d39ddcf73ceb9c8e5e50d014923) reverted? Yeah, it is more or less the old function. It inverts the scrolling, but the speed is normal. So no 120 implementation. I use current release with reverting to this without 120 https://github.com/feschber/lan-mouse/commit/e21ab02a6e752d39ddcf73ceb9c8e5e50d014923#diff-c04e25924525b7dc3115df2f79d08fd1eecbbd91bf16f575fcba89e885205f05L737-L772
Author
Owner
<!-- gh-comment-id:2231790374 --> @feschber commented on GitHub (Jul 16, 2024): https://invent.kde.org/libraries/plasma-wayland-protocols/-/merge_requests/83 https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/302 https://invent.kde.org/plasma/kwin/-/merge_requests/6116 not 100% fixed yet, but this should improve things
Author
Owner

@rodhfr commented on GitHub (Nov 19, 2024):

Same problem hyprland to hyprland. Mouse wheel not working and touchpad scrolling only works downwards in a fixed way. Middle click works fine.

<!-- gh-comment-id:2484579731 --> @rodhfr commented on GitHub (Nov 19, 2024): Same problem hyprland to hyprland. Mouse wheel not working and touchpad scrolling only works downwards in a fixed way. Middle click works fine.
Author
Owner

@ruckerzerg commented on GitHub (Jan 27, 2025):

Same problem hyprland to hyprland. Mouse wheel not working and touchpad scrolling only works downwards in a fixed way. Middle click works fine.

Can confirm: Scroll not working on Hyprland to Hyprland.

<!-- gh-comment-id:2615544581 --> @ruckerzerg commented on GitHub (Jan 27, 2025): > Same problem hyprland to hyprland. Mouse wheel not working and touchpad scrolling only works downwards in a fixed way. Middle click works fine. Can confirm: Scroll not working on Hyprland to Hyprland.
Author
Owner

@feschber commented on GitHub (Jan 27, 2025):

can you try the latest development release (of lan-mouse)? There was a fix merged a week ago.

<!-- gh-comment-id:2615547662 --> @feschber commented on GitHub (Jan 27, 2025): can you try the latest development release (of lan-mouse)? There was a fix merged a week ago.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/lan-mouse#54
No description provided.