<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: .keydown()</title>
	<atom:link href="http://api.jquery.com/keydown/feed/" rel="self" type="application/rss+xml" />
	<link>http://api.jquery.com/keydown/</link>
	<description>jQuery API Reference</description>
	<lastBuildDate>Fri, 19 Aug 2011 09:06:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Mahaq77</title>
		<link>http://api.jquery.com/keydown/comment-page-1/#comment-8152</link>
		<dc:creator>Mahaq77</dc:creator>
		<pubDate>Thu, 06 Jan 2011 02:44:09 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=746#comment-8152</guid>
		<description>How to prevent the user from using &quot;ENTER&quot; key in quick succession on a text field. On first time using &quot;ENTER&quot; key my form saves, but on using it in quick succession (more than one hit) it crashes. &lt;br&gt;&lt;br&gt;Can anybody provide me a quick solution...</description>
		<content:encoded><![CDATA[<p>How to prevent the user from using &#8220;ENTER&#8221; key in quick succession on a text field. On first time using &#8220;ENTER&#8221; key my form saves, but on using it in quick succession (more than one hit) it crashes. </p>
<p>Can anybody provide me a quick solution&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Liel Dulev</title>
		<link>http://api.jquery.com/keydown/comment-page-1/#comment-7996</link>
		<dc:creator>Liel Dulev</dc:creator>
		<pubDate>Mon, 18 Oct 2010 15:09:37 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=746#comment-7996</guid>
		<description>I should note that you are able to get the right charCode (!) for most languages in FF using the keypress event. But due to the major difference in behavior between browsers regarding event raising of key pressed using this method is a bit tricky/hackable.</description>
		<content:encoded><![CDATA[<p>I should note that you are able to get the right charCode (!) for most languages in FF using the keypress event. But due to the major difference in behavior between browsers regarding event raising of key pressed using this method is a bit tricky/hackable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Liel Dulev</title>
		<link>http://api.jquery.com/keydown/comment-page-1/#comment-6417</link>
		<dc:creator>Liel Dulev</dc:creator>
		<pubDate>Mon, 18 Oct 2010 07:09:37 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=746#comment-6417</guid>
		<description>I should note that you are able to get the right charCode (!) for most languages in FF using the keypress event. But due to the major difference in behavior between browsers regarding event raising of key pressed using this method is a bit tricky/hackable.</description>
		<content:encoded><![CDATA[<p>I should note that you are able to get the right charCode (!) for most languages in FF using the keypress event. But due to the major difference in behavior between browsers regarding event raising of key pressed using this method is a bit tricky/hackable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Liel Dulev</title>
		<link>http://api.jquery.com/keydown/comment-page-1/#comment-6406</link>
		<dc:creator>Liel Dulev</dc:creator>
		<pubDate>Sun, 17 Oct 2010 10:07:16 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=746#comment-6406</guid>
		<description>It seems that firefox 3.6 &amp; chrome 6 (on mac OS X 10.5) always return 0 as keycode for non-english chars. Safari returns the right code, in any language. &lt;br&gt;&lt;br&gt;This is important because your user&#039;s default language might be set to something else.&lt;br&gt;&lt;br&gt;</description>
		<content:encoded><![CDATA[<p>It seems that firefox 3.6 &amp; chrome 6 (on mac OS X 10.5) always return 0 as keycode for non-english chars. Safari returns the right code, in any language. </p>
<p>This is important because your user&#39;s default language might be set to something else.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Addy Osmani</title>
		<link>http://api.jquery.com/keydown/comment-page-1/#comment-6288</link>
		<dc:creator>Addy Osmani</dc:creator>
		<pubDate>Tue, 12 Oct 2010 00:57:11 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=746#comment-6288</guid>
		<description>Here&#039;s  a very quick example I coded up where you can see textarea working fine with the keydown event in FireFox: &lt;a href=&quot;http://jsfiddle.net/addyosmani/xEfSD&quot; rel=&quot;nofollow&quot;&gt;http://jsfiddle.net/addyosmani/xEfSD&lt;/a&gt;/</description>
		<content:encoded><![CDATA[<p>Here&#39;s  a very quick example I coded up where you can see textarea working fine with the keydown event in FireFox: <a href="http://jsfiddle.net/addyosmani/xEfSD" rel="nofollow">http://jsfiddle.net/addyosmani/xEfSD</a>/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rajan</title>
		<link>http://api.jquery.com/keydown/comment-page-1/#comment-6266</link>
		<dc:creator>rajan</dc:creator>
		<pubDate>Mon, 11 Oct 2010 02:11:41 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=746#comment-6266</guid>
		<description>i have a textarea that i add keydown event but this is not work in firefox.</description>
		<content:encoded><![CDATA[<p>i have a textarea that i add keydown event but this is not work in firefox.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Szalski</title>
		<link>http://api.jquery.com/keydown/comment-page-1/#comment-6228</link>
		<dc:creator>Szalski</dc:creator>
		<pubDate>Fri, 08 Oct 2010 16:44:22 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=746#comment-6228</guid>
		<description>Wouldn&#039;t something like this work ?
&lt;br&gt;
&lt;br&gt;var event          = $.Event(&#039;click&#039;);
&lt;br&gt;event.shiftKey  = true;
&lt;br&gt;$(&#039;selector&#039;).trigger(event);
&lt;br&gt;
&lt;br&gt;I am using this to test my code based on specific interactions (fake). Should work with .which...</description>
		<content:encoded><![CDATA[<p>Wouldn&#39;t something like this work ?</p>
<p>var event          = $.Event(&#39;click&#39;);<br />
<br />event.shiftKey  = true;<br />
<br />$(&#39;selector&#39;).trigger(event);</p>
<p>I am using this to test my code based on specific interactions (fake). Should work with .which&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua</title>
		<link>http://api.jquery.com/keydown/comment-page-1/#comment-5994</link>
		<dc:creator>Joshua</dc:creator>
		<pubDate>Tue, 28 Sep 2010 00:43:34 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=746#comment-5994</guid>
		<description>You cannot easily &lt;strong&gt;change&lt;/strong&gt; values in the event object (probably for security reasons), but you might be able to copy and extend it: &lt;br&gt;&lt;code&gt;var faketab=$.extend({},event,{which:9, keyCode: 9}; &lt;br&gt;faketab.which == 9;&lt;br&gt;&lt;/code&gt;&lt;br&gt;&lt;br&gt;However, a safer choice is to decouple your code:&lt;br&gt;&lt;code&gt;&lt;pre&gt;&lt;br&gt;$(&#039;#target&#039;).keypress(function(event) {&lt;br&gt;    fireWhich(event.which, event.ctrlKey, event.shiftKey);&lt;br&gt;});&lt;br&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br&gt;So you can call fireWhich directly: &lt;br&gt;&lt;code&gt;fireWhich(13); //simulate Enter key&lt;br&gt;fireWhich(9, false, true); //simulate SHIFT+TAB key&lt;/code&gt;&lt;br&gt;This will not, however, make the focus go to the previous form item like a real SHIFT+TAB keystoke would do.</description>
		<content:encoded><![CDATA[<p>You cannot easily <strong>change</strong> values in the event object (probably for security reasons), but you might be able to copy and extend it: <br /><code>var faketab=$.extend({},event,{which:9, keyCode: 9}; <br />faketab.which == 9;<br /></code></p>
<p>However, a safer choice is to decouple your code:<br /><code>
<pre>$(&#39;#target&#39;).keypress(function(event) {    fireWhich(event.which, event.ctrlKey, event.shiftKey);});</pre>
<p></code><br />So you can call fireWhich directly: <br /><code>fireWhich(13); //simulate Enter key<br />fireWhich(9, false, true); //simulate SHIFT+TAB key</code><br />This will not, however, make the focus go to the previous form item like a real SHIFT+TAB keystoke would do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Swedberg</title>
		<link>http://api.jquery.com/keydown/comment-page-1/#comment-5233</link>
		<dc:creator>Karl Swedberg</dc:creator>
		<pubDate>Sun, 29 Aug 2010 22:49:20 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=746#comment-5233</guid>
		<description>You would check for event.shiftKey: &lt;br&gt;if ( event.which == 13 &amp;&amp; event.shiftKey ) {&lt;br&gt;  // do something&lt;br&gt;}&lt;br&gt;&lt;br&gt;check out the demo above for event properties that are available on keydown.</description>
		<content:encoded><![CDATA[<p>You would check for event.shiftKey: <br />if ( event.which == 13 &#038;&#038; event.shiftKey ) {<br />  // do something<br />}</p>
<p>check out the demo above for event properties that are available on keydown.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: david_king</title>
		<link>http://api.jquery.com/keydown/comment-page-1/#comment-12252</link>
		<dc:creator>david_king</dc:creator>
		<pubDate>Sun, 29 Aug 2010 10:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=746#comment-12252</guid>
		<description>I&#039;m trying to override the event object to contain data of my choosing so I can choose the value of &quot;which&quot;, but am having no luck so far...</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to override the event object to contain data of my choosing so I can choose the value of &#8220;which&#8221;, but am having no luck so far&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

