Summary: | Being able to emulate touch screen scrolling by pressing the middle mouse button and moving it up and down. So that you can use smooth autoscroll with every application like on windows. | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Toadfield <toadfield> |
Component: | input | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | herzenschein, nate |
Priority: | NOR | ||
Version First Reported In: | 5.22.0 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/plasma-desktop/-/commit/7717671f0f074bdd0a936d927c7d86ebe47eb46c | Version Fixed In: | |
Sentry Crash Report: |
Description
Toadfield
2020-11-28 13:59:09 UTC
For which application? Handling of mouse buttons is decides inside the application. (In reply to Christoph Feck from comment #1) > For which application? Handling of mouse buttons is decides inside the > application. For every application that has smooth autoscroll,like Discord,Steam etc. The please report this to Discord or Steam authors. This isn't a steam,Discord problem,cause if you set autoscroll manually in xinput,then it works in those programs. And it would make no sense to report this to all the programs that support autoscroll if you set xinput correct. If Kde Mouse options would have an option to enable that,it would work on all of them. Can you please confirm what exact thing you're talking about? We have a handy list of definitions at https://community.kde.org/Get_Involved/Design/Lessons_Learned#Names_of_different_scrolling_effects so we can make sure we're all on the same page when talking about scrolling. Which of those effects are you talking about? (In reply to Nate Graham from comment #5) > Which of those effects are you talking about? Smooth/animated scrolling Thanks for the clarification. For each app, smooth/animated scrolling has to be implemented by one of the following: - The toolkit's scrollview - The app enabling that behavior of the toolkit's scrollview - The app's own custom scrollview implementation for apps such as Firefox which do that So there is no way we can either enable or disable this centrally, sorry. You should instead file bugs on individual apps that don't have this feature, and request it. I remember digging in some forums and enabling some settings in xinput and the autoscrolling worked for every programs. Maybe I understood those autoscroll methods you provided wrong and the thing I did was another scrolling method,later I can post what I did in xinput and you can look at it. (In reply to Nate Graham from comment #7) > Thanks for the clarification. > > For each app, smooth/animated scrolling has to be implemented by one of the > following: > - The toolkit's scrollview > - The app enabling that behavior of the toolkit's scrollview > - The app's own custom scrollview implementation for apps such as Firefox > which do that > > So there is no way we can either enable or disable this centrally, sorry. > You should instead file bugs on individual apps that don't have this > feature, and request it. By doing: xinput set-prop 11 "libinput Scroll Method Enabled" 0, 0, 1 xinput set-prop 11 "libinput Button Scrolling Button" 2 it works similar to what I want,the only thing that is missing is that middle click pasting has to be disabled,an scrolling icon would be cool and an option to click once and then move the mouse up and down instead of holding middle click to scroll would be nice too. And it works in all programs I tried. The only problem is that it feels choppy,cause if I scroll a little bit,it moves to far,but basically it works. (In reply to Toadfield from comment #9) > By doing: > xinput set-prop 11 "libinput Scroll Method Enabled" 0, 0, 1 > xinput set-prop 11 "libinput Button Scrolling Button" 2 What exactly do those commands do? (In reply to Nate Graham from comment #10) > (In reply to Toadfield from comment #9) > > By doing: > > xinput set-prop 11 "libinput Scroll Method Enabled" 0, 0, 1 > > xinput set-prop 11 "libinput Button Scrolling Button" 2 > What exactly do those commands do? I found those commands here: https://unix.stackexchange.com/questions/58900/how-to-scroll-the-screen-using-the-middle-click The person that posted those said that they do this: libinput Scroll Method Enabled 3 boolean values (8 bit, 0 or 1), in order "two-finger", "edge", "button". Indicates which scroll method is currently enabled n this device. libinput Button Scrolling Button 1 32-bit value. Sets the button number to use for button scrolling. This setting is independent of the scroll method, to nable button scrolling the method must be set to button-scrolling and a valid button must be set. So what it does at the end is if you hold down middle mouse button and move your cursor up or down ,then it scrolls until you stop holding middle mouse down. The problem is that it doesn't show a autoscroll icon and that you have to hold middle click down and you can't just click middle click once and then move your mouse up pr down to scroll. So how it achieves that is that it emulates normal scrolling I think,so it's not smooth,but it could be smoother if you set that the emulated scroll doesn't skip that much. So what I mean is,if you scroll normally with your scroll wheel,you see that it always scroll a little bit,so for the autoscroll you have that it doesn't scroll that wide,so then it would be smoother. Yeah the explanation at the end was crap,but I don't know how to explain it better. Can you please change the resolution for this feature request? Cause it's easy to implement. (In reply to Nate Graham from comment #5) > Can you please confirm what exact thing you're talking about? We have a > handy list of definitions at > https://community.kde.org/Get_Involved/Design/ > Lessons_Learned#Names_of_different_scrolling_effects so we can make sure > we're all on the same page when talking about scrolling. > > Which of those effects are you talking about? Nate, apparently what they mention is not on the list. The best method to check is to enable autoscrolling in Firefox to check what they mean, it's shown in the provided link: https://unix.stackexchange.com/questions/58900/how-to-scroll-the-screen-using-the-middle-click Here's a video exemplifying this: https://youtu.be/6_8tbkfrHRQ?t=63 I'm not sure if it's trivial, my impression is that it's just a matter of sending a dbus signal (because it's what I've done before to enable it). It seems like a valid bug to me though. I took a look at the KWin debug console and at man libinput, apparently their names are different. "libinput Scroll Method Enabled" 0, 0, 1 <-- Button, you press a button to scroll Scroll Method Available on Libinput is equivalent to supportsScrollOnButtonDown on KWin console Scroll Method Enabled on Libinput is equivalent to ScrollOnButtonDown on KWin console "libinput Scroll Method Enabled" 0, 1, 0 <-- Edge, you slide your finger over the edge of a touchpad Scroll Method Available on Libinput is equivalent to supportsScrollEdge Scroll Method Enabled on Libinput is equivalent to scrollEdge "libinput Scroll Method Enabled" 1, 0, 0 <-- Two-finger, you slide two fingers on the touchpad Scroll Method Available on Libinput is equivalent to supportsScrollTwoFinger Scroll Method Enabled on Libinput is equivalent to scrollTwoFinger Enabling the button method on common mice means you can click the middle button and autoscroll, I believe. I use the same option on a Trackman Marble and it means I can press a side button and then move the trackball for normal scrolling. Forgot to mention: it's a matter of sending a dbus signal if you're on Wayland: qdbus org.kde.KWin /org/kde/KWin/InputDevice/eventX org.kde.KWin.InputDevice.scrollOnButtonDown true Where eventX is the event that corresponds to the device. On X11 I'm not sure this is possible and much less trivial; the usual recommendation is to use Xorg conf files or xinput. (In reply to Thiago Sueto from comment #15) > Forgot to mention: it's a matter of sending a dbus signal if you're on > Wayland: > > qdbus org.kde.KWin /org/kde/KWin/InputDevice/eventX > org.kde.KWin.InputDevice.scrollOnButtonDown true > > Where eventX is the event that corresponds to the device. > > On X11 I'm not sure this is possible and much less trivial; the usual > recommendation is to use Xorg conf files or xinput. So if I got it right,then we now know how to do the autoscroll on wayland? It doesn't suprise me if it doesn't work on Xorg,nothing works with that. So if I got everything right,then now we only need a way to disable middle click pasting (that is probably easy to do),a icon for autoscrolling and a gui checkbox for all of that? I found a problem with that,if you hover over a link and press middle click,would that work or just toggle the autoscroll? So can kwin be aware if the cursor is hovering over a link or not? I have a much better idea,that instead of emulating normal scrolling,that it emulates touch pad scrolling,cause that would be "smooth" and then normal scrolling isn't "smooth". What I mean is,if you scroll normally,then you can see that it scrolls in little "steps" instead of scrolling smoothly. And touch screen scrolling would also still allow to open links. Btw with "touch screen" I mean those laptop touch pads. Forget what I said about laptop touch screen scrolling,you still can't open links,but it would still be better emulating that,cause it's smoother. Btw I made a gtk and qt feature request for autoscroll. But we would still need it for applications that use old toolkits or java. So now we only need an icon and check boy for autoscroll and a way to open links etc. So which component knows what the cursor on the screen is hovering over? Cause I don't think kwin allows that. But it doesn't matter if you can open links or not cause web browsers use their own autoscroll function,so there is no problem with this feature. So would it be easy to implement this? A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2357 Git commit 7717671f0f074bdd0a936d927c7d86ebe47eb46c by Xaver Hugl, on behalf of Evgeny Chesnokov. Committed on 04/07/2024 at 14:49. Pushed by zamundaaa into branch 'master'. kcms/mouse: add support for On-Button scrolling Now you can scroll the page when you press the middle mouse button Related: bug 416633, bug 473993, bug 477548 M +7 -1 kcms/mouse/backends/kwin_wl/kwin_wl_device.cpp M +23 -0 kcms/mouse/backends/kwin_wl/kwin_wl_device.h M +17 -5 kcms/mouse/backends/x11/x11_libinput_dummydevice.cpp M +24 -0 kcms/mouse/backends/x11/x11_libinput_dummydevice.h M +11 -0 kcms/mouse/inputdevice.h M +17 -0 kcms/mouse/ui/main.qml https://invent.kde.org/plasma/plasma-desktop/-/commit/7717671f0f074bdd0a936d927c7d86ebe47eb46c |