Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
12
rated 0 times [  12] [ 0]  / answers: 1 / hits: 3039  / 2 Years ago, fri, april 22, 2022, 6:11:12

I'm in love with Ubuntu, but I really HATE this feature. I am a programmer and it happened a number of times that I introduced a bug because I inadvertently pasted some code which didn't belong there. I still have nightmares from debugging.


And I can't even turn it off in the 'Mouse and Touchpad' window.


I think it's a weird design decision. Most people expect the middle mouse button to map to scrolling. What was the rationale behind this decision?


More From » mouse

 Answers
6

The middle mouse button is mapped to paste the current X-selection, which is normally whatever text is selected. This happens because back in the early days of gui's there was disagreement about how copy/paste should work. Some wanted there to be an explicit command to move something into the copy buffer, others wanted whatever was selected to be moved in there automatically. The makers of X11 (way back when these disagreements were still going strong in the 1980's) decided to implement both and make both sides happy, putting mouse-3 to paste the current selection and ctrl-c/ctrl-v for the copy and paste more commonly found today.



As to how to stop it the unfortunate truth is that you cannot without either patching X or disabling the middle-mouse button all together (which can be done by running



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


or by putting the line pointer = 1 25 3 4 5 6 7 8 9 in your ~/.xmodmap file).



My advice would be stick it out. The X-selection copy functionality is actually quite useful in many places and it is one of those things you quickly get used it.


[#33845] Saturday, April 23, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fulpu

Total Points: 116
Total Questions: 118
Total Answers: 104

Location: Solomon Islands
Member since Fri, Oct 8, 2021
3 Years ago
fulpu questions
Fri, Apr 1, 22, 08:36, 2 Years ago
Wed, Mar 16, 22, 15:25, 2 Years ago
Wed, Aug 24, 22, 22:59, 2 Years ago
Tue, Dec 20, 22, 22:33, 1 Year ago
;