#[Solution in Post] Disabling middle click pasting (KDE)

90 messages · Page 1 of 1 (latest)

tidal token
#

I want to disable middle click pasting. Preferably I would like to do it system-wide, but I am mostly concerned about disabling it in Chromium/Electron (without extensions), as I have middle click auto-scrolling enabled with --enable-blink-features=MiddleClickAutoscroll, which is annoying as it pastes every time I use my middle mouse button to scroll.

I am using KDE Plasma, and I do not want to disable middle clicking.

Solution

  1. Build XMousePasteBlock version 1.2: https://github.com/milaq/XMousePasteBlock/releases/tag/1.2
  • make all
  • make install

The latest (1.3) currently has an issue (https://github.com/milaq/XMousePasteBlock/issues/16) that makes it seemingly not work.
You can confirm it is installed and in $PATH with which xmousepasteblock.

  1. Check if ~/.config/klipperrc exists. If so, skip to the next step. If not, right click on the clipboard icon in the system tray and select configure clipboard. Change any setting (the easiest would be to change the history size) and click Apply & OK.
  2. Edit ~/.config/klipperrc with your preferred editor. Under [General], add this: NoEmptyClipboard=false
  3. Open the system settings program and navigate to the 'Startup and Shutdown' option, and then select the 'Autostart' section.
  4. Add -> Add Application -> (path to XMousePasteBlock here, like /usr/bin/xmousepasteblock)
  5. Reboot or log in and out (I would prefer to reboot just to make sure)
  6. Confirm that the process is running with ps aux | grep -i (PATH TO XMOUSEBLOCK)

Note: Only tested on KDE Plasma. Credit to https://github.com/milaq/XMousePasteBlock/issues/17#issuecomment-1371784589 for most of the solution. Also, setting the clipboard history size too low seemingly causes issues, so I set it to 5.

torpid quest
tidal token
#

i presume not

torpid quest
#

oh ig that's not systemwide

#

but it should work in chromium

tidal token
#

doesn't really matter as long as chromium/electron is effected

#

do i have to re-login?

torpid quest
#

i'd assume you just have to restart the app

tidal token
#

i'll try thx

torpid quest
#

yw

tidal token
#

i guess it only works for gnome?

torpid quest
#

yeah looks like it's only for gnome apps

#

Jared Robinson gave a simple solution that works on my machine:

Run the following command:

xmodmap -e "pointer = 1 25 3 4 5 6 7 8 9"

To persist this behavior, edit ~/.Xmodmap and add

pointer = 1 25 3 4 5 6 7 8 9

#

try that

#

dont restart or anything

tidal token
#

does that just disable right click tho?

torpid quest
#

not according to the site

#

just try it

tidal token
#

yeah that just disabled middle click

torpid quest
#

neat

#

well there you go

#

... close

tidal token
#

well no cuz then i can't auto scroll

crude havenBOT
#

#9639 📣 If your issue is solved, please prepend [SOLVED] to the beginning of this thread's title. Then, if possible, archive the thread.

tidal token
#

i can't use middle click

torpid quest
#

oh that's what you mean

#

um

tidal token
#

ye sorry

torpid quest
#

ill check

torpid quest
tidal token
#

?

torpid quest
#

also what if you run disable-paste first

tidal token
tidal token
torpid quest
#

before middle clicking

torpid quest
tidal token
#

idk tbh

#

gnome can disable middle click paste, hopefully kde can somehow

tidal token
#

could of fixed it, gonna test now

#

that worked

#

now i have auto-scrolling on discord content

#

[Solved] Disabling middle click pasting (KDE)

#

idk it seems a bit buggy, i will look into it tomorrow, but not gonna archive it yet

torpid quest
#

xorg is dumb as hell

tidal token
#

probably can't do the same thing on wayland lol

#

[Sort of Solved] Disabling middle click pasting (KDE)

#

it's pretty buggy ngl

#

half of the time it doesn't work

torpid quest
#

oh

tidal token
#

downgraded to 1.2 and it's working

#

well it's working sort of better, but it's still bad

#

Disabling middle click pasting (KDE)

#

copying might just not work sometimes or pasting

#

idk why

#

i have to ctrl + c or ctrl + v a bunch for it to work most of the time

#

@wintry atlas i saw you in the github issues for this project and that you are were trying to do the same thing as me, do you know how to fix this? sorry to disturb

tidal token
#

okay i think i fixed it by increasing the history size

#

[Solution in Post] Disabling middle click pasting (KDE)

tidal token
#

thx for the help

cosmic wind
#

Why is this overcomplicated solution? Just install xmousepasteblock and make it run on startup and you are done

#

Works for discord, gnome, kde, whatever

wintry atlas
#

ok so first

#

go get git from pacman

wintry atlas
#

then git clone xmousepasteblock from github

cosmic wind
#

😐

tidal token
#

1.3 is broken for me and others, and i had to also configure klipper

tidal token
cosmic wind
tidal token
#

yes

cosmic wind
#

and then it works

tidal token
#

that's what it says in the solution i put

#

and to also configure klipper

#

as it's required on plasma

cosmic wind
#

alr then

#

so thats just kde thing

tidal token
#

ye

#

klipper is annoying