Middle-click paste functionality (delete)

For some reason in linux the middle click button from the mouse acts like the paste button.
This is very annoying coming from windows (where it doesn’t do that).
After a few while reading various posts I found a solution in:
https://unix.stackexchange.com/questions/24330/how-can-i-turn-off-middle-mouse-button-paste-functionality-in-all-programs

I’m using manjaro kde and managed to fix it following those instructions. I made an easy to read guide on how to do it at:

I’d like for the ability to disable the middle-click paste functionality from the settings GUI in some easy way (it should be a feature of manjaro).

P.S. The code is very simple but it’s probably not the best way to go about it (I used chatgpt to help me with rearranging what is shown in the reddit post, but it seems to work as intended).
(If we used that code it should be straightforward to implement, I think that fixing the root cause may not be straightforward but I’m a noob to linux.)

What’s intended: disable paste functionality while keeping scroll functionality and other functions such as being able to close a tab with the middle click.

Mod edit:- Corrected illegal punctuation characters.

For users who frequently need to copy and paste text, Linux’s native middle-click paste can be a significant time-saver.

It is not something which needs to be fixed on Linux, and ‘fixing’ this would indeed break a lot of functionality.

Why do you click the middle mouse button if you don’t want to paste?

On Windows, while the feature is not built-in, it can be easily added with the help of third-party tools… surely it is Windows which needs to be ‘fixed’?

Windows simply never bothered - and Windows users (as I was many years ago) need to install third party software to get this function - as with many other things… though many Windows users just never actually thought of it.

Essentially,for folks who learn to use the middle-click paste feature, Linux is more accommodating out of the box. On Windows, a bit of customization can bring similar functionality to your workflow.

It’s just one of those things that you might find a little new - there’s no need for a knee-jerk reaction, just try using it deliberately and you’ll see.

It can be disabled in Gnome Tweaks, but your ‘solution’ would be different with different desktops, because they are all different.

5 Likes

I found it weird when I first moved over, but it didn’t take long for me to get used to it and since then I find it very useful.

There is a GUI option in mate, but I can’t find one in KDE.

If you want it included in KDE’s settings then you’ll need to create a feature request with KDE.

https://community.kde.org/Get_Involved/Issue_Reporting
https://bugs.kde.org/

4 Likes

There is an entry for this configuration at the archwiki;

https://wiki.archlinux.org/title/Clipboard#Disabling_middle-click_paste

But seeing as how you are literally the first person I have ever heard complain about this, I am also going to guess there is little impetus to make such changes universal.

3 Likes

… and I struggle every time when I’m on Windows where that functionality is not present and you have to always highlight and copy, then click again and paste

It’s only inconvenient when you are not used to it.

I don’t know whether and how this can be made to work like in Windows - I never had the urge or need to try to do that, because I do find it very convenient.

1 Like

Please use an apostrophe rather than diacritic for punctuation. The ` and some other characters are reserved for other forum formatting requirements, for example.

I have edited your post in this instance.

In future please take care to use proper punctuation characters.

Regards.


Also removed superfluous noise from topic title.

I have seen (in some forums) that some folks regard it as a bug - when they think Middle click is ONLY for opening links in the background (and this still works in Firefox - as it’s heavily application dependent).

But similarly, though you might swear when you’re drinking with friends, you tend to be aware that you shouldn’t swear at your mother - context is everything.

2 Likes

It can be used to auto-scroll by moving the mouse in a browser too…and you can have all three (at least with firefox). As you say context is everything.

2 Likes

… on second thought:
isn’t it different in Wayland sessions? (like in Windows)
I think this is a function of the X window system (xorg).

I seem to remember it that way - but it has been years that I encountered a Wayland session.

Seems Wayland has copied it. Works for me in Wayland KDE.

1 Like

ok. - I’ll see it when I use Wayland in the future - I tought I remembered this as one of the things that where different to working under X
but that was some time ago

In the begining that was true, but users complained about it so it was added and now is standard

3 Likes

Aha - I wasn’t sure whether I remembered it correctly.
Good to know that now xorg and wayland behave the same way in this regard.

Even in Windows, I’ve never known a middle mouse button to default to anything, as one typically has to assign the button manually in the absence of application-specific mapping.

Though, I suppose it depends which applications are used;

for example (as previously mentioned) the background opening of links which is often pre-configured in browsers and other HTML and/or Markdown capable applications.

I recall games might often use a middle-click for … something; at least, before the advent of game controllers.

Paste just seems natural to me.
Perhaps that only shows a bias. :zipper_mouth_face:

IIRC, back in the XP or 7 days … it was often a ‘set scroll’ button.
As in press the middle-click, and a sort of :arrow_up_down: button would appear over the cursor, and the page would scroll up or down rapidly in sync with you simply moving the cursor up or down (press middle-click again and the cursor returns to a normal pointer).
Or maybe that was specific to some manufacturer or something?
In any case its usefulness was … unremarkable.

1 Like

Pretty sure you’re right, I think it was a windows thing or perhaps office (though it may have originally come from another OS or piece of software). I only ever used it by accident so my memory is vague.

That’s also what I meant by auto-scroll in firefox, move the mouse more and it moves faster. Slightly more useful, at least if you play an instrument and read music or tab from the screen. Assuming you can get the right speed.

In the “XP” days, I’m reasonably sure I only used two-button mice, but even so, I seem to recall seeing what you describe; achieved by pressing both buttons simultaneously; perhaps it was a precursor of sorts to that functionality.

Precursor; the pun was unintended; if anyone saw it that way.

This factor alone made it more trouble than it was worth.

I did mostly, or it might’ve been Windows 95/98, but I’m pretty sure I did get one before I stopped using XP.

However if I remember correctly there was an Archimedes in school which had a 3 button mouse, before they got PCs with Windows 95. I can’t remember if it also had the feature.

True.

I seem to remember Ultimate Guitar having similar functionality which was easier to use. Actually they still do but it doesn’t seem to work for me any more. :frowning:

I know three-button mice existed in those times – they gained popularity with gaming (Amiga, I suppose) – in my case, I didn’t find a need to change from two-button mice until late into my XP “experience”.

1 Like

It probably did because it was only a button, no scroll wheel.

Right, I think I’m done with posting random thoughts today. Hope I didn’t bother anyone too much. :crossed_fingers: :slight_smile:

1 Like