[Okular] Autoscroll with the middle mouse button

An option to have autoscroll like in Firefox (when it is enabled). Click with the middle mouse button anywhere on the document, a symbol like this is displayed:


Move the mouse up or down, and the screen starts scrolling. The farther the mouse pointer is from the symbol, the faster the autoscroll: from really slow (a few pixels per second) to blazing fast (dozens of pages per second). Click again anywhere (either with middle or left button) to stop autoscrolling.

If instead of clicking with the middle mouse button, the user clicks and drags up or down, the same thing happens, only autoscroll is stopped when the middle mouse button is released.

It is flawlessly implemented in Firefox, including Firefox’s built-in PDF viewer, which is otherwise inferior to Okular in every way (in my opinion), apart from having his feature.

I would like this feature to be an option in the settings, disabled by default, so that current behaviour of middle click (zoom) is not affected for users who prefer it this way.


This sounds like a good feature! Please post it on bugs.kde.org so it can be tracked and hopefully added!


Can you elaborate on this? In my experience, middle click is always used for pasting from the secondary clipboard.

From my understanding, middle-click to paste is standard on Linux while middle-click to scroll is more of a Windows thing.

Indeed; I’m just confused about the zoom part. I’ve never seen middle click to zoom.

Yeah that is weird, middle-click does not zoom for me in Okular and I don’t see an option to do so (nor does any of the tools enable you to middle-click to zoom).

Strange… I open a PDF file in Okular. I click and drag up or down with the middle mouse button and the page zooms in or out.

In fact, the mouse cursor briefly changes to this:
…which is additionally confusing, since it does not scroll up or down, just zooms in or out. Then it changes back to:


Need to simultaneously hold the middle mouse button and then move mouse forward/backward to zoom in/out.
A single middle click doesn’t really do anything.

I think it’s possible to have a solution of single click middle button to activate scroll, and holding button + move mouse to zoom.

That is how it is currently, and there are people who like it that way, so I think it should remain the default behaviour.

All I’m asking is for an option that the user can toggle to change that behaviour, so that it is pretty much identical to how it is in Firefox (when autoscroll option is enabled). Maybe an option in the settings, or a button in the main toolbar.

Autoscroll is currently possible in Okular, but it leaves much to be desired. It is turned on only with the keyboard ( ⇧ Shift + ↑ or ↓), which in my opinion, is not very good accessibility, and the top speed is very, very slow. With the mouse, it could be just as slow, but also blazing fast, up to hundred of pages per second.

+1 for middle click to scroll

The zoom thing is not standard behavior for text based applications today in modern times. The current zoom with middle click will confuse new users in my opinion. Please change it or make it an option to scroll with middle click.

1 Like

+1 for middle click to scroll.
This problem was first raised in 2009. Someone even made a patch for this but maintainer refused to merge it.
Please add it.

1 Like

Personally, and this is my hot take, if I’m going to copy and paste I’ll just use the shortcuts, whereas I feel like the multi-axis scroll thing on windows is a so much more useful feature for the middle button. I scroll far more often than I paste personally, so being able to scroll horizontally across all apps, let alone okular, would be a godsend

All web browsers have this capability. Not to mention many other programs. I don’t understand why this has been ignored for so long. This is the only program I personally know of that zooms in this way.

It’s really confusing. Almost like there is a gatekeeper for this specific thing.

Likely what is happening is similar to the BLENDER right vs left click issue where the devs are afraid of messing with old users. Blender semi recently changed the default behavior and it made old users irritated initially, come to find out most advanced users now prefer the new default or simply change it in the settings to the old way. On top of that new users have a WAY simpler time using the software allowing the community to grow. Look up advanced users like Andrew Price for example. I know this as well from many anecdotes from game dev friends of mine.

Respecting legacy ways only keeps the community small. Blender was able to take a leap of faith. Don’t get caught in the same trap Okular. Please think about new users and get over that learning hump. It takes a few projects to get over it and that’s it because you’ll find “oh yeah this is how everything else works”.

1 Like

This functionality can be implemented while completely respecting legacy. It does not have to be the default, it can be an option in the settings. Legacy can remain the default behaviour, I have no issue with that – on the contrary, I think that should be the case, at least for the time being.

Radical changes to the UX are always risky, but an additional option inconveniences nobody, and there is clearly a demand for this.

I second this.

This is a highly erratic behavior. KDE should leave such UI quirks to the GNOME devs.

To make it clear: it’s not about clicking the middle mouse button/wheel (which of course should remain paste) but holding it while moving the mouse.

No, that’s wrong. When you click (and release) the middle mouse button, an icon with arrows appears at the position where the middle mouse button was clicked and autoscrolling is enabled. The speed of autoscrolling is proportional to the distance between the icon and the mouse pointer. Click with any mouse button anywhere stops autoscrolling.

See how the behaviour is implemented in Firefox, it should be exactly like that, as that is what is expected by “middle mouse button autoscrolling”.

There is no need for any pasting in a document viewer.

you are right.

i actually have forgotten that because i always move my mouse immediately at the moment i click the wheel button.

but i disagree with your opinion regarding okular being a pure file viewer and therefore doesn’t need a middle-click-pasting-content-function. pdfs do have formulars that can be filled by the viewer. nonetheless this shouldn’t stop implementing autoscroll as it is e.g. in firefox, because firefox can handle the distinction between paste and autoscroll flawlessly too, so this shouldn’t be an obstacle.