<?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>The True Tribe &#187; Search Results  &#187;  middle click</title>
	<atom:link href="http://www.thetruetribe.com/?s=middle+click&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.thetruetribe.com</link>
	<description>Vroom! That&#039;s us leaving IE in the dust.</description>
	<lastBuildDate>Fri, 22 Jan 2010 23:34:03 +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>Installing Synergy For Linux and Windows</title>
		<link>http://www.thetruetribe.com/2008/06/installing-synergy-for-linux-and-windows/</link>
		<comments>http://www.thetruetribe.com/2008/06/installing-synergy-for-linux-and-windows/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 08:43:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://wordpress.thetruetribe.com/?p=44</guid>
		<description><![CDATA[Synergy is a great app that allows you to control your Linux and Windows computers via a single keyboard and mouse. You can plug in the keyboard/mouse to either Linux or Windows machines and fluidly switch between computers just as easily as you would switch between monitors in a dual-monitor set up.
Here is a description [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://synergy2.sourceforge.net/">Synergy</a> is a great app that allows you to control your Linux and Windows computers via a single keyboard and mouse. You can plug in the keyboard/mouse to either Linux or Windows machines and fluidly switch between computers just as easily as you would switch between monitors in a dual-monitor set up.<span id="more-44"></span></p>
<p>Here is a description and image from the Synergy site which demonstrates this functionality:</p>
<blockquote><p>In this example, the user is moving the mouse from left to right. When the cursor reaches the right edge of the left screen it jumps instantly to the left edge of the right screen.</p>
<p><img src="http://synergy2.sourceforge.net/images/warp.gif" alt="" />You can arrange screens side-by-side, above and below one another, or any combination.  You can even have a screen jump to the opposite edge of itself.  Synergy also understands multiple screens attached to the same computer.</p></blockquote>
<p>I&#8217;ve been using it for a couple of years now and I find it an invaluable addition to the arsenal of any developer who works in both Windows and Linux. I built a new computer over the weekend and finished installing Ubuntu 8.08 Gutsy Gibbon tonight. One of the first things I did was install Synergy. Previously, I set it up on Red Hat Enterprise, but either way, the set up is pretty straightforward.</p>
<p><span style="font-weight: bold;">Let&#8217;s get started</span> installing Synergy, shall we? The Windows set up is easier because it has a GUI. In Windows, go to the <a href="http://synergy2.sourceforge.net/">Synergy SourceForge</a> page to download the latest release (version 1.3.1 as of this writing).  Here&#8217;s the download link if you don&#8217;t want to be bothered with navigating the SourceForge page:</p>
<ul>
<li> <a href="http://downloads.sourceforge.net/synergy2/SynergyInstaller-1.3.1.exe?modtime=1143984577&amp;big_mirror=0">Download SynergyInstaller-1.3.1.exe from SourceForge</a></li>
</ul>
<p>Once it&#8217;s downloaded, install it and open the <span style="font-style: italic;">synergy.exe</span> file to launch the program.</p>
<p>I prefer to set Windows as the client and Linux as the slave, although it was recommended in a forum post to do the opposite in Windows Vista. Regardless, I haven&#8217;t had issues with Vista or XP in either configuration.</p>
<p>For now, let&#8217;s assume your keyboard and mouse is hooked into the Linux box and you want to make Windows the slave (client).  To do this, simply click the radio button next to <span class="code" style="font-style: italic;">Use another computer&#8217;s shared keyboard and mouse (client)</span>. Then, enter the Linux computer&#8217;s host name next to <span class="code" style="font-style: italic;">Other Computer&#8217;s Host Name</span>. For me, this is &#8216;ubuntu&#8217; but you may have been more creative with your host name.</p>
<p>We&#8217;re not quite ready to test it yet, so leave this window open and go back to Linux for a moment. In Ubuntu, install Synergy by typing:</p>
<p><span style="font-family: courier new;">sudo apt-get install synergy</span></p>
<p>If you prefer doing things in the console, then you can manually create the config files. Otherwise, you can use a GUI called QuickSynergy to get up and running. Here&#8217;s how to do either way:</p>
<p><span style="font-weight: bold;">The manual way</span> might take a little longer, or not, depending on how good you are with command line interfaces. To install it manually, first you must create a configuration file called <span style="font-style: italic;">synergy.conf</span> that looks like this:</p>
<pre>    section: screens
      <span class="arg">screen1</span>:
      <span class="arg">screen2</span>:
   end
   section: links
      <span class="arg">screen1</span>:
          right = <span class="arg">screen2</span>
      <span class="arg">screen2</span>:
          left = <span class="arg">screen1</span>
   end</pre>
<p>You can place the config file in /etc/ or /usr/local/etc/ (whichever you prefer).  Just make sure it is somewhere in the environment PATH for convenience&#8217;s sake.</p>
<p>For me, this file says:</p>
<pre>    section: screens
      ubuntu:
      laptop<span class="arg"> </span>:
   end
   section: links
      <span class="arg">screen1</span>:
          right = <span class="arg">laptop
</span> <span class="arg">screen2</span>:
          left = ubuntu<span class="arg"> </span>
   end</pre>
<p>My laptop is, of course, named &#8216;laptop&#8217; &#8212; again, feel free to use more imaginative names (as long as it is actually the name of the computer). It isn&#8217;t necessary to use the name of the computer as the name of the screen but it requires extra configuration otherwise.  (See <a href="http://synergy2.sourceforge.net/">the official documentation</a> for more information on this).</p>
<p>Now that you&#8217;ve created the file, you&#8217;re ready to launch Synergy. Give it a try with this line:</p>
<pre>    synergys -f --config synergy.conf</pre>
<p>Assuming it starts correctly, jump back to Windows and click &#8216;Test&#8217; in Synergy there. It should say that it connected OK and everything is fine and dandy. If that&#8217;s the case, then just click &#8216;Start&#8217; and you&#8217;re done. If not, visit <a href="http://synergy2.sourceforge.net/">the docs page</a> and scroll towards the bottom to troubleshoot the issue.</p>
<p><span style="font-weight: bold;">If you prefer graphically configuring Synergy</span>, that&#8217;s an option, too. I guess I should have put the GUI solution first for us lazy developers, but it&#8217;s good to be familiar with the non-graphical way anyway. I know that I managed to mess up my config file using the GUI and had to dive in to it regardless.</p>
<p>That being said, the GUI (called QuickSynergy) is very straightforward and easy to use. To install QuickSynergy, type the following in a Linux terminal:</p>
<p><span style="font-family: courier new;">sudo apt-get install quicksynergy</span></p>
<p>Once it&#8217;s installed, you can type <span style="font-style: italic;">quicksynergy</span> to launch it (add &amp; at the end if you want to retain your terminal window) and a window will popup that allows you to configure Synergy, either as host or client.</p>
<p><img src="http://quicksynergy.sourceforge.net/imagens/QuickSynergyLinux.png" border="0" alt="" align="middle" /></p>
<p>The default tab which opens is for host, and all you have to do is enter the correct screen names and then start it. For me, my Linux desktop (named &#8216;ubuntu&#8217;) is on the left and my Vista laptop (named &#8216;laptop&#8217;) is on the right, so I just made sure that the fields to the left and right of the computer image said &#8216;ubuntu&#8217; and &#8216;laptop&#8217;, respectively.</p>
<p>QuickSynergy is theoretically easier to use than the command line way detailed above, so I won&#8217;t go into much depth here. If you get stuck with QuickSynergy, either try the command line way, or visit the <a href="http://quicksynergy.sourceforge.net/">QuickSynergy SourceForge site </a>to see screenshots and example configurations.</p>
<p><span style="font-weight: bold;">Extra Features:</span></p>
<ul>
<li>Synergy has the ability to auto-sync starting and stopping of screensavers</li>
<li>You can copy and paste between Linux and Windows (this is a huge time-saver!)</li>
<li>Easily lock the mouse/keyboard to the current screen by toggling scroll lock (assignable to any other key)</li>
</ul>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.thetruetribe.com%2F2008%2F06%2Finstalling-synergy-for-linux-and-windows%2F&amp;linkname=Installing%20Synergy%20For%20Linux%20and%20Windows"><img src="http://www.thetruetribe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.thetruetribe.com/2008/06/installing-synergy-for-linux-and-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retaining Middle-Click Functionality With JavaScript</title>
		<link>http://www.thetruetribe.com/2008/04/retaining-middle-click-functionality-with-javascript/</link>
		<comments>http://www.thetruetribe.com/2008/04/retaining-middle-click-functionality-with-javascript/#comments</comments>
		<pubDate>Sat, 26 Apr 2008 22:54:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wordpress.thetruetribe.com/?p=17</guid>
		<description><![CDATA[

Image used under a Creative Commons license. Source


Browsers such as Firefox and Internet Explorer 7 allow users to middle-click on links to open them in a new tab. Oftentimes, JavaScript will be used to add an onclick event to a link that supersedes the link itself. But, when a Firefox or IE7 user middle-clicks the [...]]]></description>
			<content:encoded><![CDATA[<div style="width: 420px; float: left;">
<p><a href="http://www.thetruetribe.com/uploaded_images/547178990_316247fd37_o-750509.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="cursor: pointer;" src="http://www.thetruetribe.com/uploaded_images/547178990_316247fd37_o-750504.png" border="0" alt="" /></a></p>
<p><span style="font-size:9;">Image used under a Creative Commons license. <a href="http://www.flickr.com/photos/joshnunn/547178990/in/set-72157601413422631/">Source</a><br />
</span></div>
<div>
<p>Browsers such as Firefox and Internet Explorer 7 allow users to middle-click on links to open them in a new tab. Oftentimes, JavaScript will be used to add an onclick event to a link that supersedes the link itself.<span id="more-17"></span> But, when a Firefox or IE7 user middle-clicks the link they may be confronted with any number of sub-par user experiences, such as the new tab containing the same page they were on, or a blank page.</p>
<p>In order to prevent this from happening,<strong> a non-JavaScript fallback must be present</strong>. Some people only think about the small (estimated less than 5%) amount of users who have JavaScript disabled, and choose not to support those users. That&#8217;s a conscious decision and I certainly understand it, and condone it as long as there are clearly defined messages to the JS-disabled user that they need to enable JavaScript to use the page.</p>
<p>However, what some people fail to recognize is that even the 95% of users with JavaScript enabled will have sub-par user experiences if there are not non-JS fallbacks cases like this, where middle-clicking a link does nothing but waste the user&#8217;s time. In order to offer the best user experience and fully utilize the capabilities of the browser, a conscientious JavaScript developer must take a number of measures that might not be apparent at first glance.</p>
<h3>When Should Middle-Click Functionality Be Retained?</h3>
<p>There are many uses for JavaScript onclick events. Not all of them will need to support the middle click. To determine if it does, ask yourself if it appears as a link to the user. If it looks like a link (be it text, image or button that appears to lead to another page) then it should support middle-click behavior. If it is another use for an <span style="font-family:Courier New;">onclick</span> event, for instance, a button that clearly performs an action on the current page, then no alternative is necessary.</p>
<p>Take the case of a fancy search results widget that heavily uses JavaScript and Ajax to present search results. Users with JavaScript disabled are presented with instructions on how to enable it, and informed that they won&#8217;t be able to use the site with out it. So far so good, but unless the search results have a non-JavaScript fallback (unlikely) then middle-clicking them will not have the expected result of some users, which is to take the user to a product detail page.</p>
<p>A real life example: I was interested in tickets to a jazz show and visited the tickets page for that festival. It has a link saying &#8220;Watch a video of this artist.&#8221; I middle-clicked the link, as I usually do, but the next tab contained the exact same information I had just seen&#8211; no video in sight. I inspected the HTML to see that it was a link, but the <span style="font-family:Courier New;">href</span> was set to <span style="font-family:Courier New;">&#8220;#&#8221;</span>, in other words, an empty name on the same page.</p>
<p>When I left-clicked the anchor tag, it executed a JavaScript function and opened a popup showing the video. But, middle-clicking proved pointless, as it was a &#8220;dummy&#8221; anchor tag that should have been a span with <span style="font-family:Courier New;">cursor: pointer</span> in the CSS.</p>
<p>In fact, I quite commonly see JavaScript <span style="font-family:Courier New;">onclick</span> events on anchor tags, where the anchor tag <strong>serves no other purpose than to make the mouse cursor a pointer</strong>. Take the following code, for example:</p>
<p><span style="font-family:Courier New;">&lt;a href=&#8221;#&#8221; onclick=&#8221;showMoreResults();&#8221;gt;Show more results&lt;/a</span></p>
<p>If you left-click the link, it will take you to the top of the page (implicit in the <span style="font-family:Courier New;">&#8220;#&#8221;</span> name) and execute the <span style="font-family:Courier New;">showMoreResults()</span> function, which does an Ajax call to fetch more search results, let&#8217;s say. So far so good. But if you middle-click the link, it will take you to the same page <em>without</em> executing the function. Furthermore, if it&#8217;s a complex JavaScript application, the state of the application may be lost. In the case of search results, the newly-opened tab may have reset back to the original state of the application, frustrating the user. Of course they can just close the tab and use their existing tab, so all is not lost, but it is still a waste of time from the user&#8217;s perspective.</p>
<p>If it is truly a JavaScript feature which does not appear as a link, the wise developer would remove the user&#8217;s ability to middle-click it. By changing it to a span tag, middle-clicking would do nothing.</p>
<p>On the other hand, if it actually looks like a link (and in this case, I think it does), then a middle-click fallback would be nice. Say the user wants to open the next page of search results in the new tab, but stay on the existing page in this tab. Middle-clicking should work, right?</p>
<h3>How to Retain Middle-Click Functionality</h3>
<p>The way to do this is to set the <span style="font-family:Courier New;">href</span> attribute of your anchor tags to a page presenting the user with the same content they would get by left-clicking. So, if your app uses Ajax to load in new results by left-clicking, then middle-clicking should take them to the same results on a new page. This is accomplished by <strong>setting the <span style="font-family:Courier New;">href</span> attribute with the correct URL</strong> to the content. If you&#8217;re on <span style="font-family:Courier New;">search-results.php?page=1</span> then you would need to set the <span style="font-family:Courier New;">href</span> to be <span style="font-family:Courier New;">search-results.php?page=2</span>. The solution varies from app to app but the general idea is to make sure that the <span style="font-family:Courier New;">href </span>of the link leads to the content advertised in the link.</p>
<p>Next, you need to make sure the onclick event returns false. If you&#8217;re using inline event registration, it looks like this:</p>
<p><span style="font-family:Courier New;">&lt;a href=&#8221;search-results.php?page=2&#8243; onclick=&#8221;showMoreResults(); return false;&#8221;&gt;Show more results&lt;/a&gt;</span></p>
<p>This is <strong>the same as a</strong> <strong>non-JavaScript fallback</strong> <strong>for links.</strong> It&#8217;s a good idea to do this anyway, regardless of middle-click support, as approximately 1-in-20 users will have JS disabled anyway (although this number may vary depending on your particular target market).</p>
<p>Something else to keep in mind is that if you are outputting the <span style="font-family:Courier New;">href</span> from the server and then showing new results with JavaScript, you&#8217;ll need to update the <span style="font-family:Courier New;">href</span> tag as well. Otherwise, you could go to page 1, click &#8220;Show more results&#8221; and view page 2&#8217;s results, and then middle-click &#8220;Show more results&#8221; and be presented with page 2&#8217;s results again. Why? Because the href was set on page 1 to show page 2&#8217;s results, and the JavaScript loaded in new results using Ajax. The solution to this is to make sure you update the <span style="font-family:Courier New;">href</span> to display the correct content each time the application state changes, be it with Ajax or otherwise.</p>
<p>It&#8217;s fairly straightforward&#8211; if you&#8217;re on page 10, then when the <span style="font-family:Courier New;">showMoreResults()</span> function is called you load in new results for page 11 with Ajax, and set the <span style="font-family:Courier New;">href</span> of the &#8220;Show more results&#8221; link to point to page 12.</p>
<p>This is just one example using search results, but the same principle applies to any JavaScript actions that the user perceives as links. When middle-clicking the link, or clicking it with JavaScript disabled, the user should be presented with the right content. Otherwise, they will feel like the site is broken, or like they did something wrong. Instead, make sure you&#8217;ve always placed non-JavaScript and middle-click fallbacks in your pages.</p>
<p>Whenever adding an <span style="font-family:Courier New;">onclick</span>, ask yourself if it looks like a link or a button that would take the user to a new page. Unless the <span style="font-family:Courier New;">onclick</span> is operating directly on the contents of the current page and it&#8217;s obvious to the user, consider using the methods outlined above.</div>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.thetruetribe.com%2F2008%2F04%2Fretaining-middle-click-functionality-with-javascript%2F&amp;linkname=Retaining%20Middle-Click%20Functionality%20With%20JavaScript"><img src="http://www.thetruetribe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.thetruetribe.com/2008/04/retaining-middle-click-functionality-with-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
