<?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; Hardware</title>
	<atom:link href="http://www.code-zen.net/tag/hardware/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>Wed, 12 Oct 2011 01:11:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Book Review &#8211; Code</title>
		<link>http://www.code-zen.net/2010/book-review-code/</link>
		<comments>http://www.code-zen.net/2010/book-review-code/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 19:53:57 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[Book Reviews]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[circuits]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://www.code-zen.net/?p=440</guid>
		<description><![CDATA[I just finished reading Code by Charles Petzold.  This book is like no other I&#8217;ve ever read.  This book explains how computers work.   Think about that for a second.  Do you know how a computer actually works?  Really?  This isn&#8217;t about double clicking on the blue &#8220;E&#8221; to access the internet.  This book explains how a [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-441" title="code" src="http://www.code-zen.net/wp-content/uploads/2010/04/code-150x150.png" alt="" width="150" height="150" />I just finished reading Code by Charles Petzold.  This book is like no other I&#8217;ve ever read.  This book explains how computers work.   Think about that for a second.  Do you know <em>how</em> a computer actually <em>works</em>?  Really?  This isn&#8217;t about double clicking on the blue &#8220;E&#8221; to access the internet.  This book explains how a machine can take electrical 1&#8242;s and 0&#8242;s and use them to do math, save files, display graphics, and everything else a computer does.</p>
<p>I love the way the book progresses.  It starts with the most basic of electrical circuits.  Simple light bulb and battery type stuff.  It spends a few chapters building your circuit board chops and BAM!  - he shows you how you can wire a circuit to add binary numbers.  Wow, you can now build a very simple computer.  He continues to add to what you already know piece by piece.   Components are added to the circuit board so that it can now perform subtraction, multiplication, and division.  You learn how a circuit can remember data, the basis of memory.  You learn the issues surrounding floating point math and how they are resolved.  He explains machine code, and how it can be simplified by assembly language, and in turn, high-level languages.</p>
<p>Mixed in with the technical chapters, he adds sections on lighter topics such as Morse code, Braile, alternate (non-base 10) number systems, and more.  He covers how letters can be stored as a series of bits, and why there are 8 bits to a byte.</p>
<p>This book changed the way I think about computers.  I highly recommend it to anyone who wants to understand them better.  Although it assumes no prior knowledge, this book is not for the faint of heart; some of the chapters require tenacity to stay focused and comprehend.  However, I guarantee it will be well worth it.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbook-review-code%2F&amp;title=Book+Review+-+Code" ><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%2F2010%2Fbook-review-code%2F&amp;title=Book+Review+-+Code" ><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%2F2010%2Fbook-review-code%2F&amp;title=Book+Review+-+Code" ><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%2F2010%2Fbook-review-code%2F&amp;headline=Book+Review+-+Code" ><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=Book+Review+-+Code&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbook-review-code%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=Book+Review+-+Code&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbook-review-code%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=Book+Review+-+Code&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbook-review-code%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=Book+Review+-+Code&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbook-review-code%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=Book+Review+-+Code&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbook-review-code%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%2F2010%2Fbook-review-code%2F&amp;title=Book+Review+-+Code&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%2F2010%2Fbook-review-code%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%2F2010%2Fbook-review-code%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/buzz/post?url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbook-review-code%2F" ><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/2010/book-review-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<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://www.code-zen.net/wp-content/uploads/2009/11/Screenshot.jpg" target="_blank" rel="lightbox[307]"><img class="aligncenter size-medium wp-image-314" title="xinput list" src="http://www.code-zen.net/wp-content/uploads/2009/11/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://www.code-zen.net/wp-content/uploads/2009/11/Screenshot-2.jpg" target="_blank" rel="lightbox[307]"><img class="aligncenter size-medium wp-image-316" title="xev" src="http://www.code-zen.net/wp-content/uploads/2009/11/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://www.code-zen.net/wp-content/uploads/2009/11/screenshot-4.jpg" target="_blank" rel="lightbox[307]"><img class="aligncenter size-medium wp-image-318" title="Add Startup" src="http://www.code-zen.net/wp-content/uploads/2009/11/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/buzz/post?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/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>3</slash:comments>
		</item>
	</channel>
</rss>

