STRG+V is triggered when pressing the mouse wheel

Hi,

every time I release the pressed mousewheel, the content of my clipboard is pasted. This leads to some software being unuseable, for example in figma I use the 3rd mouse button to position the canvas, but every time the text of the clipboard is inserted. I can reproduce this on every text field.

I used “sudo libinput debug-events” but it only registers the button press.
“event23 POINTER_BUTTON +3.020s BTN_MIDDLE (274) pressed, seat count: 1”

I also checked the gnome shortcuts, but I could not find anything that would issue this.

Can somebody help me? Is there a log where I can see what happens when pressing the button?

Thank you all!

This is feature of Linux (one of most useful by the way). Some DE allow to change this behavior, some don’t. In KDE you can disable this in clipboard settings. Don’t know if it’s possibile in Gnome.

3 Likes

The middle mouse button default is to paste – but, the button can be re-mapped. There are several packages that can help you achieve what you want.

Regards.

1 Like

I did a bit of looking around on the web and it looks like the gnome-tweaks package provides an option to disable middle click paste:

To install the package:

sudo pacman -Syu gnome-tweaks

or

pamac install gnome-tweaks

After installation, Gnome Tweaks should be available in your application launcher, or it can be launched with the command gnome-tweaks

Thank you so much!

I changed the setting in the gnome tweaks, which does not have any effect.

if using the input remap, what should I map on the button. I want the normal 3rd mouse button to use it in firefox, but I dont want the paste…

Did you log out & back in? Maybe it needs to load the mouse setting at session start.

1 Like

I do not know anything about that program or what it does.
But:
it sounds to me like the sentence should have said:

for example, in Windows environments, in figma I use the 3rd mouse button to position the canvas

Is that a correct assessment?

In Linux, that key/mouse button is traditionally and by default mapped to “paste” the current selection.

It has always been that way - and Wayland adopted it, too.

… you mark text by pressing left and highlighting it, then you paste that highlighted portion somewhere else by middle click
no CTRL+C and CTRL+V copy/paste keyboard sequence needed

… it’s one of these “the little differences” :wink: (intended a Pulp Fiction reference here)

With that Gnome tool, you’d disconnect the predefined shortcut - if that is easily possible with that tool -
and assign the middle button press to whatever function you want it to have in your program.

Perhaps you can use that particular programs preferences to assign that key press to the function you want it to have there?
I do not know.

… or you’d have to change your habit and workflow when switching in between Windows and Linux environments …

It’s definitely not Manjaro specific.

1 Like

The value for the following should be either true or false matching the Middle Click Paste toggle:

gsettings get org.gnome.desktop.interface gtk-enable-primary-paste

If the value is false, then I suggest looking into the specific settings of whatever application you’re using.

Hi, fist of all thank you all for helping me out, I am amazed that still exists.

  1. Figma is an online application, I use it in the browser. So it might be designed with Windows / MacOS users in mind.

  2. Yes, I restarted and everything.

  3. if I issue the command, it says “false”

  4. it still pastes, in every application I tried. So seems to be global

  5. I can use InputRemapper to map for example BTN_Middle to KEY_A. That works. But then I cannot move the canvas in Firefox, because it does not get the BTN_Middle event. So I do not know how I can issue a BTN_Middle press without issueing the paste.

As you are using Firefox, you can easily disable middle-mouse pasting by opening the about:config page, searching for “paste”, and changing the middlemouse.paste value from “true” to “false”:

yes, you saved me! Thanks so much :slight_smile: -)

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.