Saturday, April 20, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 5601  / 2 Years ago, thu, august 11, 2022, 3:52:11

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.


More From » 20.04

 Answers
7

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:




  1. Install xbindkeys xsel xdotool



  2. Place this in ~/.xbindkeysrc


    "echo -n | xsel -n -i; pkill xbindkeys; xdotool click 2; xbindkeys"  
    b:2 + Release


  3. Reload xbindkeys -p





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.


[#1019] Friday, August 12, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
afyess

Total Points: 437
Total Questions: 120
Total Answers: 107

Location: San Marino
Member since Fri, Jul 3, 2020
4 Years ago
;