Bug 439610

Summary: Autoscroll using middle click
Product: [Plasma] kwin Reporter: Gabriel <gabriel>
Component: inputAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: afedotov861, aliahmadipersonal, axlefr, cwo.kde, dashonwwIII, duha.bugs, findanotherplace, hsaom, katrikbenher, kde, mclemoret97, meven, nate, vincefvanwijk, waynejwoww, yanth
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Example of autoscrolling a PDF in Firefox
Mouse Middle Click + Drag to Scroll Option in Mouse System Settings

Description Gabriel 2021-07-07 18:37:20 UTC
Created attachment 139925 [details]
Example of autoscrolling a PDF in Firefox

SUMMARY
It would be quite nice to have autoscrolling by middle clicking and controlling speed and direction with the cursor and not just by using 'shift-arrow keys'. Such an option is wonderful to have when browsing through large documents. 

STEPS TO REPRODUCE
1. Open a document in Okular
2. Middle click

OBSERVED RESULT
Nothing

EXPECTED RESULT
A symbol (see attachment) appears as a reference point and scrolls based on the cursors distance from it.

SOFTWARE/OS VERSIONS
KDE neon User edition 5.22

ADDITIONAL INFORMATION 
Apologies if this is more relevant to another part of the software stack, e.g. Qt. If so, then please point me to the right place.
Comment 1 Laura David Hurka 2021-07-09 18:30:39 UTC
> STEPS TO REPRODUCE
> 1. Open a document in Okular
> 2. Middle click
> 
> OBSERVED RESULT
> Nothing

Is this description accurate? Okular should zoom in or out without discrete steps, that is what middle-click-and-drag is currently used for.
Comment 2 Gabriel 2021-07-10 09:08:40 UTC
Ah, that is true. I wasn't aware that dragging the cursor while middle clicking would do that. However, a simple middle click will still not do anything. Perhaps it would then conflict with the zooming action to have autoscrolling as well?
Comment 3 Laura David Hurka 2021-07-10 11:30:06 UTC
What you described is middle-click-and-release-then-drag, instead of middle-click-and-drag, right?

Now that I think about it again, I think that can be implemented both at the same time.
Comment 4 Gabriel 2021-07-11 09:22:57 UTC
Yes, that's correct. Simply middle clicking enters an autoscrolling "mode" which allows you to scroll the page by moving the cursor until the next click. It seems however that autoscrolling can usually also be done by holding middle click and dragging, but of course that would conflict with zooming in the case of Okular.

Perhaps it would still be fine to compromise between having both zooming and scrolling, however similar the actions to perform them are? I would certainly not mind and probably use both a lot, but I can't speak for everyone.
Comment 5 Axle 2021-08-11 23:16:01 UTC
I Think adding autoscrolling support across all application i.e.(discord, document viewer, web browser.) would be great.

I really don't like having to do hacky code just to get this feature.

I don't know if x11 can support it, but I think wayland is the future, and can probably be implemented in the wayland kwin compositor.
Comment 6 Visne 2022-06-25 18:45:57 UTC
I would also love to have this feature system-wide. It is basically the only thing I miss from Windows.
Comment 7 Liz Lee 2025-01-17 14:29:49 UTC
i second this.

the current behavior (zooming with middle-click) differs from common UX behavior, as all(tm) other programs in the field of "working with documents" use middle-click-scrolling.

whenever a UI/UX interaction differs from the commonly expected behavior, there should be an option to let the user choose the common behavior. this is not gnome.

the new kde plasma system-wide middle-click-scroll option does not mitigate this problem as it behaves very uncommon on its own.
Comment 8 Méven 2025-05-10 10:05:27 UTC
This would need to be implement in KWin.
Comment 9 Axle 2025-05-10 10:44:16 UTC
Libinput supports on-button scrolling (middle click autoscroll) and it looks like Plasma 6.2 added libinput's on-button scrolling.
https://www.phoronix.com/news/Plasma-6.2-Auto-Scrolling
Comment 10 cwo 2025-05-13 08:21:33 UTC
(In reply to Axle from comment #9)
> Libinput supports on-button scrolling (middle click autoscroll) and it looks
> like Plasma 6.2 added libinput's on-button scrolling.

On-button scrolling is not auto-scrolling. Auto-scrolling is automatic and moves the view continuously depending on the direction and distance where the pointer was clicked. On-button scrolling is a scroll-wheel emulation that translates movement, not position, to scroll events, and as such is not automatic - it's a direct response to immediate user input. Its primary purpose is to substitute for a scroll wheel on devices that do not have one. It's not intended to substitute for Windows-style auto-scrolling, so it's better to not use that term (and we don't do so in the mouse configuration page).
Comment 11 kmdest 2025-10-10 03:04:02 UTC
+1 this would be killer. The better the fundamental window and scrolling experience is, the more things KDE will have over windows. Not that windows does this any better, or at all.
Comment 12 aliahmadipersonal 2025-10-16 13:33:02 UTC
I hope its added to the Okular soon, this feature is very compatible with muscle memory of other PDF Viewers.
I know KDE added a MMB as Scroll in their Mouse settings, but that is a global change which messes up my browser and other apps.
Comment 13 aliahmadipersonal 2025-10-16 13:33:22 UTC
I hope its added to the Okular soon, this feature is very compatible with muscle memory of other PDF Viewers.
I know KDE added a MMB as Scroll in their Mouse settings, but that is a global change which messes up my browser and other apps.
Comment 14 Tyler 2025-11-08 02:40:55 UTC
I would also really like to see this feature added. I used this daily on windows and would like to see it added here instead of to every application I use.
Comment 15 Katrik Benher 2025-11-22 09:30:32 UTC
+1 I also want this feature.. 
Also, if the function be like if I Ctrl+MiddleClick means current zoom function and, normal MiddleClick invokes the Autoscroll function and, an option in settings window to inter-change this as per the user preference.
Comment 16 Katrik Benher 2025-11-22 09:45:46 UTC
Created attachment 187051 [details]
Mouse Middle Click + Drag to Scroll Option in Mouse System Settings

@everyone : hey guys, Just now noticed that, when I enabled the option "Hold down middle button and move mouse to scroll" in Mouse System Settings. now, I can scroll using the mouse middle-click+drag instead of the Zoom. Please can you check it. I'm attaching the screenshot of the option in the Mouse System Settings.
Comment 17 cwo 2025-11-22 11:22:13 UTC
(In reply to Katrik Benher from comment #16)
> @everyone : hey guys, Just now noticed that, when I enabled the option "Hold
> down middle button and move mouse to scroll" in Mouse System Settings. now,
> I can scroll using the mouse middle-click+drag instead of the Zoom. Please
> can you check it. I'm attaching the screenshot of the option in the Mouse
> System Settings.

This is a different feature for scroll wheel emulation, primarily for devices that do not have a scroll wheel (like pointing sticks and some trackballs), though some people also find it useful with the mouse. It scrolls only as you're moving the pointer. This has been available for a few Plasma releases now (and was automatically turned on for these devices even before that).

What people here are asking for is something different: Just click the middle mouse button (without holding it), then move the pointer once, and it will continue scrolling in that direction even if you're no longer moving the mouse, at a speed depending on the distance of the pointer to the place you originally clicked  (until you exit the mode, or move the pointer to its original location, which stops it from scrolling further). This is a common pattern on Windows, but very rare behavior on Unix systems, and is currently not generally available as an option (though some applications in some contexts may implement it on their own).
Comment 18 Katrik Benher 2025-11-22 11:39:34 UTC
(In reply to cwo from comment #17)
> (In reply to Katrik Benher from comment #16)
> > @everyone : hey guys, Just now noticed that, when I enabled the option "Hold
> > down middle button and move mouse to scroll" in Mouse System Settings. now,
> > I can scroll using the mouse middle-click+drag instead of the Zoom. Please
> > can you check it. I'm attaching the screenshot of the option in the Mouse
> > System Settings.
> 
> This is a different feature for scroll wheel emulation, primarily for
> devices that do not have a scroll wheel (like pointing sticks and some
> trackballs), though some people also find it useful with the mouse. It
> scrolls only as you're moving the pointer. This has been available for a few
> Plasma releases now (and was automatically turned on for these devices even
> before that).
> 
> What people here are asking for is something different: Just click the
> middle mouse button (without holding it), then move the pointer once, and it
> will continue scrolling in that direction even if you're no longer moving
> the mouse, at a speed depending on the distance of the pointer to the place
> you originally clicked  (until you exit the mode, or move the pointer to its
> original location, which stops it from scrolling further). This is a common
> pattern on Windows, but very rare behavior on Unix systems, and is currently
> not generally available as an option (though some applications in some
> contexts may implement it on their own).

I already know that. It's not the same. I just commented just in case it helps anyone looking. And, another reason is that when I enable this, it behaves the same in all apps. So, if the developers add Autoscroll feature directly to mouse settings itself like a radio button style to toggle MiddleClick+Drag to scroll or Middle-Click to enable Autoscroll function, it would be beneficial across all other apps rather than just for okular alone.. Its just an idea, what do you think?