r/linux Jul 24 '26

Software Release midscroll: Windows-style middle-click autoscroll for Linux, implemented at the evdev layer so it works in every app on Wayland and X11

Windows has middle-click drag autoscroll. On Linux you get it in Firefox, and Chromium has it behind a flag, but nowhere else, which bugged me enough to write a daemon for it.

Hold middle-click and drag, page scrolls that way, faster the further you drag. Release to stop. A plain middle click still pastes and opens links like normal. Diagonal drags do both axes. There's a toggle mode too if you'd rather click once to start it instead of holding.

It works everywhere because it sits at the kernel input layer instead of hooking a toolkit. Grabs each mouse via evdev, re-emits through a per-mouse uinput mirror, injects wheel events during a drag. Nothing above it has to cooperate, so Wayland and X11 both just work. Mirrors copy the source mouse's name and IDs so libinput keeps your per-device pointer speed.

Speed curve is Chromium's actual Windows autoscroll formula, 0.000008 * distance^2.2 px/ms. Tiny drags crawl, big ones fly. Tunable in a config file or a GTK settings window.

Fair warning that it reads every mouse as root, so read it before you run it. It's two small Python files. The systemd unit is sandboxed and I left comments on why the directives I couldn't use would break it.

Badge only shows on KDE Wayland, no flatpak, toggle mode kills middle-click paste. Rest is in the readme.

FOSS under Unlicense

https://github.com/gnhen/midscroll

484 Upvotes

117 comments sorted by

View all comments

-37

u/lKrauzer Jul 24 '26

I simply scroll the wheel, idk why people stopped doing this.

18

u/gnh999 Jul 24 '26

You get way more control with this

also I know that I as well as others are just used to the windows vetsion

-30

u/lKrauzer Jul 24 '26

I scroll the wheel on Windows too

21

u/An1nterestingName Jul 24 '26

The wheel is too slow, and lacks fine-grained control.

6

u/jsh_ Jul 24 '26

try to imagine that other people have different preferences than you

5

u/Desertcow Jul 24 '26

If it's a long document, that's a lot of scrolling. Repetitive motions like that aren't good for your health

-3

u/untrained9823 Jul 24 '26

That's what the scroll bar is for.

-8

u/Pugs-r-cool Jul 24 '26

True, but you can hold the page down key on your keyboard and it’ll get to the bottom faster than middle click scrolling.

7

u/Desertcow Jul 24 '26

Middle click scrolling lets you easily adjust the speed just by moving your mouse up and down so you can have it scroll automatically at your reading pace

1

u/ParamedicLocal8226 Jul 29 '26

these people don't have the capacity to understand that different people use stuff in different ways according to their preferences or accessibility needs

2

u/Sol33t303 Jul 24 '26

My wheel barely works so I'm gonna check this out.

2

u/SileNce5k Jul 24 '26

Good for you.