Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Main Support Categories > General Help
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

General Help
All your general support questions for Ubuntu, Kubuntu, Edubuntu and Xubuntu.

 
Thread Tools Display Modes
Old December 6th, 2008   #1
quadra
5 Cups of Ubuntu
 
Join Date: Aug 2007
Beans: 19
Howto: Configure a double click on middle mouse button

This is a short guide on how to configure your mouse such that the middle button (scroll wheel) generates a double click.
  • Install packages xautomation and xbindkeys (download size only ~ 30 kB each; use Synaptic package manager or “sudo apt-get install xautomation” / “...xbindkeys”)
  • Create the file “.xbindkeysrc” in your home directory (gedit ~/.xbindkeysrc)
  • Paste the following two lines (2 stands for middle mouse button, at both occurrences), save the file:

Code:
"/usr/bin/xte 'mouseup 2' 'mouseclick 1' 'mouseclick 1' &"
b:2
  • To test the setup and get diagnostic info, type “xbindkeys -n -v” in a terminal. Ctrl+C to exit.
  • To start xbindkeys every time you log on: System - Preferences - Sessions - Add - “xbindkeys”, command = xbindkeys
quadra is offline   Reply With Quote
Old December 6th, 2008   #2
quadra
5 Cups of Ubuntu
 
Join Date: Aug 2007
Beans: 19
Re: Howto: Configure a double click on middle mouse button

Some explanations:

xbindkeys is a tool which grabs keys and mouse events. xautomation includes the command-line tool xte which we use to send input to the kernel. Our configuration file specifies what we send (a double click) when the button is clicked.

This seems to be the easiest solution at present. The former solution using btnx does no longer run in Ubuntu 8.x; and just editing xorg.conf does not seem to make the double click possible. (Please let us know if you have better solutions...!!)

For a more extensive guide, check http://ubuntuforums.org/showthread.php?t=316441 (that's where this post is inspired from)

If you don't like this kind of command-line solutions, vote for the idea to enhance this here:
http://brainstorm.ubuntu.com/idea/120/

Last edited by quadra; December 6th, 2008 at 02:07 PM.. Reason: fix urls
quadra is offline   Reply With Quote

Bookmarks

Tags
double-click, mouse button 2, mouse buttons

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:15 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry