LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-08-2008, 11:38 AM   #1
tromboneman
Member
 
Registered: Jan 2007
Distribution: Debian
Posts: 67

Rep: Reputation: 15
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!
 
Old 06-08-2008, 11:53 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
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.

Last edited by b0uncer; 06-08-2008 at 11:54 AM.
 
  


Reply

Tags
clipboard, copy, paste, xorg



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vim won't paste on middle click anymore slackhack Linux - General 4 07-01-2007 11:09 PM
alter middle click paste Four Programming 3 04-30-2007 03:43 PM
How do i "copy" one bios and "paste" it onto another identical machine Yerp Linux - Hardware 2 01-10-2007 08:31 PM
Disable copy-paste on middle mouse button 311Sam Ubuntu 6 10-09-2006 08:40 PM
Disabling middle click paste. Pyroknight Linux - Software 6 04-20-2004 07:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration