<?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: Ctrl + Key Combination &#8211; Simple Jquery Plugin</title>
	<atom:link href="http://www.gmarwaha.com/blog/2009/06/16/ctrl-key-combination-simple-jquery-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gmarwaha.com/blog/2009/06/16/ctrl-key-combination-simple-jquery-plugin/</link>
	<description>Ganesh\</description>
	<lastBuildDate>Sat, 31 Jul 2010 07:07:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Cindy</title>
		<link>http://www.gmarwaha.com/blog/2009/06/16/ctrl-key-combination-simple-jquery-plugin/comment-page-1/#comment-75698</link>
		<dc:creator>Cindy</dc:creator>
		<pubDate>Wed, 14 Jul 2010 08:56:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=35#comment-75698</guid>
		<description>Thanks</description>
		<content:encoded><![CDATA[<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bolu</title>
		<link>http://www.gmarwaha.com/blog/2009/06/16/ctrl-key-combination-simple-jquery-plugin/comment-page-1/#comment-73379</link>
		<dc:creator>bolu</dc:creator>
		<pubDate>Tue, 01 Jun 2010 18:34:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=35#comment-73379</guid>
		<description>thank admin</description>
		<content:encoded><![CDATA[<p>thank admin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: travesti</title>
		<link>http://www.gmarwaha.com/blog/2009/06/16/ctrl-key-combination-simple-jquery-plugin/comment-page-1/#comment-73245</link>
		<dc:creator>travesti</dc:creator>
		<pubDate>Sun, 30 May 2010 08:49:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=35#comment-73245</guid>
		<description>Ctrl” key is down even if another key is being pressed along with gallr</description>
		<content:encoded><![CDATA[<p>Ctrl” key is down even if another key is being pressed along with gallr</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: travesti</title>
		<link>http://www.gmarwaha.com/blog/2009/06/16/ctrl-key-combination-simple-jquery-plugin/comment-page-1/#comment-71116</link>
		<dc:creator>travesti</dc:creator>
		<pubDate>Sun, 25 Apr 2010 10:19:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=35#comment-71116</guid>
		<description>Ctrl” key is down even if another key is being pressed along with Ctrl.</description>
		<content:encoded><![CDATA[<p>Ctrl” key is down even if another key is being pressed along with Ctrl.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: syava</title>
		<link>http://www.gmarwaha.com/blog/2009/06/16/ctrl-key-combination-simple-jquery-plugin/comment-page-1/#comment-70141</link>
		<dc:creator>syava</dc:creator>
		<pubDate>Tue, 30 Mar 2010 16:00:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=35#comment-70141</guid>
		<description>[...] you ... 759. syava on February 17th, 2010 at 3:26 pm. Script has some bugs with content that ...Ctrl + Key Combination Simple Jquery Plugin &#124; GaneshIn a recent web application I was working on, I had a need for the Ctrl + S hotkey to save an entry [...]</description>
		<content:encoded><![CDATA[<p>[...] you &#8230; 759. syava on February 17th, 2010 at 3:26 pm. Script has some bugs with content that &#8230;Ctrl + Key Combination Simple Jquery Plugin | GaneshIn a recent web application I was working on, I had a need for the Ctrl + S hotkey to save an entry [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony</title>
		<link>http://www.gmarwaha.com/blog/2009/06/16/ctrl-key-combination-simple-jquery-plugin/comment-page-1/#comment-68509</link>
		<dc:creator>Tony</dc:creator>
		<pubDate>Fri, 19 Feb 2010 00:51:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=35#comment-68509</guid>
		<description>Hi, is there a way to invoke the Ctrl+F key combo from a simple hyperlink using jquery, to bring up the &quot;find in page&quot; box in all browsers?</description>
		<content:encoded><![CDATA[<p>Hi, is there a way to invoke the Ctrl+F key combo from a simple hyperlink using jquery, to bring up the &#8220;find in page&#8221; box in all browsers?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David S</title>
		<link>http://www.gmarwaha.com/blog/2009/06/16/ctrl-key-combination-simple-jquery-plugin/comment-page-1/#comment-68445</link>
		<dc:creator>David S</dc:creator>
		<pubDate>Wed, 17 Feb 2010 20:09:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=35#comment-68445</guid>
		<description>This worked great, although I did need to tweak it slightly as I needed to modify Ctrl+Insert, which required a keycode.

This is how I modified the code: 

$.ctrl = function(key, callback, args) {
    var isCtrl = false;
    $(document).keydown(function(e) {
        if(!args) args=[]; // IE barks when args is null

        if(e.ctrlKey) isCtrl = true;
        var kc = parseInt(key);
        if((!isNaN(kc) &amp;&amp; kc &gt; 0 &amp;&amp; e.keyCode == key &#124;&#124; isNaN(kc) &amp;&amp; e.keyCode == key.charCodeAt(0)) &amp;&amp; isCtrl) {
            callback.apply(this, args);
            return false;
        }
    }).keyup(function(e) {
        if(e.ctrlKey) isCtrl = false;
    });
};



$.ctrl(45, function() { alert(&#039;custom functionality goes here&#039;); return false; });</description>
		<content:encoded><![CDATA[<p>This worked great, although I did need to tweak it slightly as I needed to modify Ctrl+Insert, which required a keycode.</p>
<p>This is how I modified the code: </p>
<p>$.ctrl = function(key, callback, args) {<br />
    var isCtrl = false;<br />
    $(document).keydown(function(e) {<br />
        if(!args) args=[]; // IE barks when args is null</p>
<p>        if(e.ctrlKey) isCtrl = true;<br />
        var kc = parseInt(key);<br />
        if((!isNaN(kc) &amp;&amp; kc &gt; 0 &amp;&amp; e.keyCode == key || isNaN(kc) &amp;&amp; e.keyCode == key.charCodeAt(0)) &amp;&amp; isCtrl) {<br />
            callback.apply(this, args);<br />
            return false;<br />
        }<br />
    }).keyup(function(e) {<br />
        if(e.ctrlKey) isCtrl = false;<br />
    });<br />
};</p>
<p>$.ctrl(45, function() { alert(&#8216;custom functionality goes here&#8217;); return false; });</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: krishna</title>
		<link>http://www.gmarwaha.com/blog/2009/06/16/ctrl-key-combination-simple-jquery-plugin/comment-page-1/#comment-68137</link>
		<dc:creator>krishna</dc:creator>
		<pubDate>Wed, 10 Feb 2010 05:47:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=35#comment-68137</guid>
		<description>Hi this is krishna i need help from you when i am calling javascript function Ctrl+D event has to be fire can you please give me solution pleeeez</description>
		<content:encoded><![CDATA[<p>Hi this is krishna i need help from you when i am calling javascript function Ctrl+D event has to be fire can you please give me solution pleeeez</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jordan Boesch</title>
		<link>http://www.gmarwaha.com/blog/2009/06/16/ctrl-key-combination-simple-jquery-plugin/comment-page-1/#comment-66811</link>
		<dc:creator>Jordan Boesch</dc:creator>
		<pubDate>Thu, 07 Jan 2010 01:58:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=35#comment-66811</guid>
		<description>Cool plugin! I wrote something pretty similar recently that adds a new event that you can bind called &quot;keystrokes&quot;.  Check it out!
http://boedesign.com/blog/2009/12/30/keystrokes-for-jquery/</description>
		<content:encoded><![CDATA[<p>Cool plugin! I wrote something pretty similar recently that adds a new event that you can bind called &#8220;keystrokes&#8221;.  Check it out!<br />
<a href="http://boedesign.com/blog/2009/12/30/keystrokes-for-jquery/" rel="nofollow">http://boedesign.com/blog/2009/12/30/keystrokes-for-jquery/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: travesti</title>
		<link>http://www.gmarwaha.com/blog/2009/06/16/ctrl-key-combination-simple-jquery-plugin/comment-page-1/#comment-64756</link>
		<dc:creator>travesti</dc:creator>
		<pubDate>Sun, 15 Nov 2009 02:54:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.gmarwaha.com/blog/?p=35#comment-64756</guid>
		<description>It is enough to check for e.ctrlKey as it will return true if the “Ctrl” key is down even if another key is being pressed along with Ctrl.</description>
		<content:encoded><![CDATA[<p>It is enough to check for e.ctrlKey as it will return true if the “Ctrl” key is down even if another key is being pressed along with Ctrl.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
