Ask HN: How do I disable middle-click paste in Chrome?

3 points by herodoturtle 2 years ago

Let me start by apologising for asking this here. I suspect it isn't entirely in the spirit of typical HN discussion. It's just that I cannot find the solution elsewhere online despite my best efforts. Perhaps I'm growing incompetent in my old age. On Ubuntu (20.04), you can use gnome-tweaks to disable the middle-click-to-paste feature. Once disabled here, it is applied to all gnome apps and assorted programs (for example the text editor, terminal, etc.).

However for some reason the middle-click-paste persists inside of Chrome. This is extremely frustrating because I am one of those users that likes to hold down middle-click to scroll (which is particularly ergonomic on my ThinkPad - fellow ThinkPad users will understand).

What's happening now however is that whenever I scroll in Chrome whilst typing an email or filling in forms it just randomly pastes whatever is in my clipboard. Aside from being annoying, I've on occasion also accidentally submitted / sent erroneously pasted text.

How on earth can I disable middle-click-paste in Chrome without disabling middle-click altogether?

Is there some kind of Chrome setting or flag or extension?

Help me HNers; you're my only hope.

bkq 2 years ago

Middle-click paste functionality is something that is part of either Wayland or Xorg, so the solution will vary depending on which one you're using. From doing some preliminary search I came across this thread with a potential fix for Xorg: https://www.linuxquestions.org/questions/linux-newbie-8/disa...

  • herodoturtle 2 years ago

    Thank you! I did not know this. Will dig further. Appreciate the tip.