<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>&#60;Code Zen /&#62; &#187; karmic</title>
	<atom:link href="http://www.code-zen.net/tag/karmic/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.code-zen.net</link>
	<description>Peter Anselmo&#039;s Home on the Web</description>
	<lastBuildDate>Thu, 17 Jun 2010 15:16:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Re-Map Default Mouse Buttons in Ubuntu Karmic</title>
		<link>http://www.code-zen.net/2009/ubuntu-map-mouse-buttons/</link>
		<comments>http://www.code-zen.net/2009/ubuntu-map-mouse-buttons/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 05:30:50 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[buttons]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[mouse]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.code-zen.net/?p=307</guid>
		<description><![CDATA[While setting up a new installation of Ubuntu 9.10 for a friend, I ran into a small issue: she was using a 4 button Kensington trackball mouse, and the default key mappings made little sense.  Naturally, there were no drivers or software available, but after some research I was able to figure out how to [...]]]></description>
			<content:encoded><![CDATA[<p>While setting up a new installation of Ubuntu 9.10 for a friend, I ran into a small issue: she was using a 4 button Kensington trackball mouse, and the default key mappings made little sense.  Naturally, there were no drivers or software available, but after some research I was able to figure out how to manually remap the mouse buttons.</p>
<p><strong>Step 1. Find the name of your device.</strong><br />
This step is pretty simple.  Open up a terminal and type in the command:</p>
<pre>xinput list</pre>
<p>This will list all of the input devices recognized by the X window system.  The names are in quotes, and should be pretty self-explanatory; any external mice should be near the bottom.</p>
<p><a href="http://c0876682.cdn.cloudfiles.rackspacecloud.com/Screenshot.jpg" target="_blank"><img class="aligncenter size-medium wp-image-314" title="xinput list" src="http://c0876682.cdn.cloudfiles.rackspacecloud.com/Screenshot-300x209.jpg" alt="xinput list" width="300" height="209" /></a></p>
<p><strong>Step 2. Find your button numbers</strong><br />
Each mouse button has a unique number to the system, and your next job is to find out what they are.  In your termal window type:</p>
<pre>xev</pre>
<p>This will open a new smaller window.  Whenever your mouse is over the new window, the terminal will print any input it receives.  This includes both movement and button presses.  For each button on the mouse, press it, and write down what button number it displays.  Don&#8217;t forget that scroll up, down, left, and right and wheel click are all treated as different &#8220;buttons&#8221;.</p>
<p><a href="http://c0876682.cdn.cloudfiles.rackspacecloud.com/Screenshot-2.jpg" target="_blank"><img class="aligncenter size-medium wp-image-316" title="xev" src="http://c0876682.cdn.cloudfiles.rackspacecloud.com/Screenshot-2-300x187.jpg" alt="xev" width="300" height="187" /></a></p>
<p><strong>Step 3. Re-Map the buttons</strong><br />
You can modify your your mappings with the following command (substituting your device name from step 1)</p>
<pre>xinput set-button-map "Device Name" 1 2 3 4 5</pre>
<p>Running the above command will most likely change nothing, it will map all the buttons to their default functions.  Let&#8217;s say your left and right click map to 1 &amp; 3 respectively.  If you wanted to switch them (perhaps for a left-handed user) the command would be:</p>
<pre>xinput set-button-map "Device Name" 3 2 1 4 5</pre>
<p>In the case of my friend (with a Kensington pro mouse) we needed to swap the 1 &amp; 3 with the 8 &amp; 9 buttons.  That looked like this:</p>
<pre>xinput set-button-map "Kensington Pro PS/2" 8 2 9 4 5 6 7 1 3</pre>
<p>Note that you can enter as many numbers as you like, up to the number of mouse buttons.  Any numbers you don&#8217;t enter will be assumed to be the sequential default.  Thus the following command is equivalent to the one above:</p>
<pre>xinput set-button-map "Kensington Pro PS/2" 8 2 9 4 5 6 7 1 3 10 11 12 13</pre>
<p><strong>Step 4. Saving your mappings</strong><br />
Once you&#8217;ve found the correct sequence of numbers, you can have it load automatically by creating a startup item.  Navigate to the following menu:</p>
<p>System &gt; Preferences &gt; Startup Applications &gt; Add</p>
<p>and enter the following:</p>
<p>Name: Mouse Button Remap<br />
Command: xinput &#8220;Device Name&#8221; 1 2 3 4 5<br />
Comment: &#8220;Swapped the left and right click&#8221;</p>
<p><a href="http://c0876682.cdn.cloudfiles.rackspacecloud.com/screenshot-4.jpg" target="_blank"><img class="aligncenter size-medium wp-image-318" title="Add Startup" src="http://c0876682.cdn.cloudfiles.rackspacecloud.com/screenshot-4-300x186.jpg" alt="Add Startup" width="300" height="186" /></a></p>
<p>Ta Da! You&#8217;re Done!</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-map-mouse-buttons%2F&amp;title=Re-Map+Default+Mouse+Buttons+in+Ubuntu+Karmic"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-map-mouse-buttons%2F&amp;title=Re-Map+Default+Mouse+Buttons+in+Ubuntu+Karmic"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-map-mouse-buttons%2F&amp;title=Re-Map+Default+Mouse+Buttons+in+Ubuntu+Karmic"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-map-mouse-buttons%2F&amp;headline=Re-Map+Default+Mouse+Buttons+in+Ubuntu+Karmic"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Re-Map+Default+Mouse+Buttons+in+Ubuntu+Karmic&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-map-mouse-buttons%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Re-Map+Default+Mouse+Buttons+in+Ubuntu+Karmic&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-map-mouse-buttons%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Re-Map+Default+Mouse+Buttons+in+Ubuntu+Karmic&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-map-mouse-buttons%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Re-Map+Default+Mouse+Buttons+in+Ubuntu+Karmic&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-map-mouse-buttons%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Re-Map+Default+Mouse+Buttons+in+Ubuntu+Karmic&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-map-mouse-buttons%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-map-mouse-buttons%2F&amp;title=Re-Map+Default+Mouse+Buttons+in+Ubuntu+Karmic&amp;summary=&amp;source="><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-map-mouse-buttons%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-map-mouse-buttons%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/reader/link?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-map-mouse-buttons%2F&amp;title=Re-Map+Default+Mouse+Buttons+in+Ubuntu+Karmic"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2009/ubuntu-map-mouse-buttons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
