I am running Kubuntu 20.04.
I just noticed that clicking the middle mouse button pastes my clipboard; I don't like that.
I cannot find a way to disable this behaviour. I would like to keep middle mouse button click working, but disable the paste action.
Right-click somewhere on the desktop and choose Configure Desktop and Wallpaper... from the context menu. This will open the Desktop Folder Settings window. There you can configure the mouse actions:
The following solution globally disables paste on middle click for me while retaining all middle mouse button and clipboard functionality:
Follow the steps described in this answer, that is:
In step 2. you may need to remove the
+ Release
part as described in this post, depending on what works on your machine.Set up
xbindkeys
to run on startup.Then open Klipper, e.g. via the clipboard icon in the system tray > right click > Configure Clipboard. Uncheck the option 'Prevent empty clipboard'. Reboot and the problem should be solved.
The latter idea is thanks to milaq's XMousePasteBlock.
Steps for a solution:
Identify the ID/IDs of your device with
Get the button map with
Set the button action
Repeat the last command for as many IDs as your mouse has.
1
stands for the mapping of left-click, then for middle click, etc. Use for<new action>
number0
to disable middle-click, number1
if you want to make it equivalent to left-click, etc.There are other possible methods.
Related: