<?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>Webmaster Sucks &#187; keyboard shorcuts</title>
	<atom:link href="http://www.webmastersucks.com/tags/keyboard-shorcuts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webmastersucks.com</link>
	<description>Here I share stuff I used to suck at as a novice webmaster..</description>
	<lastBuildDate>Mon, 13 Jun 2011 06:39:43 +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>Using Keyboard Shortcuts in Javascript</title>
		<link>http://www.webmastersucks.com/using-keyboard-shortcuts-in-javascript/</link>
		<comments>http://www.webmastersucks.com/using-keyboard-shortcuts-in-javascript/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 20:16:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Html & Javascript]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery framework]]></category>
		<category><![CDATA[keyboard codes]]></category>
		<category><![CDATA[keyboard shorcuts]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=167</guid>
		<description><![CDATA[
			
				
			
		
New type of web sites use keyboards for some functions. It is always helping more usable. I hope this codes will help your web site.
In the following example, we&#8217;re simply going to verify the key pressed down by the user. If the key pressed are Ctrl+S, a function will be triggered.
var isCtrl = false;
document.onkeyup=function(e) {
    [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fusing-keyboard-shortcuts-in-javascript%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fusing-keyboard-shortcuts-in-javascript%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>New type of web sites use keyboards for some functions. It is always helping more usable. I hope this codes will help your web site.</p>
<p>In the following example, we&#8217;re simply going to verify the key pressed down by the user. If the key pressed are Ctrl+S, a function will be triggered.</p>
<pre class="brush: jscript; title: ;">var isCtrl = false;
document.onkeyup=function(e) {
    if(e.which == 17) isCtrl=false;
}document.onkeydown=function(e){
    if(e.which == 17) isCtrl=true;
    if(e.which == 83 &amp;&amp; isCtrl == true) {
         alert('Keyboard shortcuts are cool!');
         return false;
    }
}</pre>
<p><strong>Example with the JQuery framework</strong></p>
<pre class="brush: jscript; title: ;">var isCtrl = false;$(document).keyup(function (e) {
if(e.which == 17) isCtrl=false;
}).keydown(function (e) {
    if(e.which == 17) isCtrl=true;
    if(e.which == 83 &amp;&amp; isCtrl == true) {
        alert('Keyboard shortcuts + JQuery are even more cool!');
return false;
}
});</pre>
<p>For more and keyboard shorcuts codes <a href="http://www.catswhocode.com/blog/using-keyboard-shortcuts-in-javascript" target="_blank">click here&gt;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/using-keyboard-shortcuts-in-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

