LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Disable xorg's "highlight to copy, middle click to paste" clipboard (http://www.linuxquestions.org/questions/linux-newbie-8/disable-xorgs-highlight-to-copy-middle-click-to-paste-clipboard-647810/)

tromboneman 06-08-2008 11:38 AM

Disable xorg's "highlight to copy, middle click to paste" clipboard
 
Is there any way I can disable the highlight to copy, middle click to paste "feature"? I have a laptop with middle click emulation turned on (I am NOT willing to turn this off!), so I accidentally paste random things into random documents all the time. I have scoured the web for info, and found very little. Isn't there some xorg.conf option to disable this?

Thank you!

b0uncer 06-08-2008 11:53 AM

I'm sure there are other ways of achieving it, but here's one you can try. This is more or less off the top of my head; I read this from somewhere a long ago (while wondering why my mouse wheel didn't scroll in Slackware), but you can safely try it -- change your configuration back to normal if it's not what you like :) The original thing was with a wheel mouse, but try (and play around if needed) and see if it works with your emulated mouse as well. I don't see why it wouldn't.

The "trick" would be to remap the middle button (usually wheel click in a wheelmouse, or just middle button) that is used to paste to something else than the real middle button; this way the pasting shouldn't happen, because the mouse acts like you pressed something else than middle-button -- for example left button. The mouse buttons are numbered so that (at least in an ordinary right-handed mouse) left button is number one, middle button number two, right button number three and so on (wheel is usually numbers 4 and 5). So in that case button number 2 (middle button) should be mapped to something else, say left button (1).

To try it, modify your xorg.conf file and try adding a line like this to the mouse section:

Code:

Option "ButtonMapping" "1 1 3 4 5"
That's a line for a wheel mouse (left- and right buttons, wheel click, wheel scroll = 5 "buttons"), modify it for your needs. Note the beginning: in a normal case the numbers would be "1 2 3" and so on (left/middle/right etc.), but here the middle button (2) is mapped to left button (1).

Hope it helps. If you find a more clever way of doing it, or just some other way, post it here for other readers.


All times are GMT -5. The time now is 08:37 PM.