Warning: Cannot modify header information - headers already sent by (output started at /home/.liana/solanos/solanosystems.com/index.php:11) in /home/.liana/solanos/solanosystems.com/wp-commentsrss2.php on line 8
Comments on: Detecting Multiple KeyPress Combos with Prototype http://www.solanosystems.com/archives/2007/02/01/detecting-multiple-keypress-combinations-with-prototype/ Notes from a wandering developer in Minneapolis Fri, 25 Jul 2008 05:09:17 +0000 http://wordpress.org/?v=2.0.2 by: Ken Snyder http://www.solanosystems.com/archives/2007/02/01/detecting-multiple-keypress-combinations-with-prototype/#comment-47336 Thu, 12 Jun 2008 19:50:13 +0000 http://www.solanosystems.com/archives/2007/02/01/detecting-multiple-keypress-combinations-with-prototype/#comment-47336 Very helpful, thanks! It is quite possible to avoid global variables if you register your observer inside a closure: <code><br /> (function() {<br /> &#160;&#160;var controlFlag;<br /> &#160;&#160;Event.observe(&#46;..controlFlag&#46;..);<br /> })();<br /> </code> Very helpful, thanks!

It is quite possible to avoid global variables if you register your observer inside a closure:

(function() {
  var controlFlag;
  Event.observe(...controlFlag...);
})();

]]>
by: Jim http://www.solanosystems.com/archives/2007/02/01/detecting-multiple-keypress-combinations-with-prototype/#comment-43327 Thu, 20 Mar 2008 22:19:31 +0000 http://www.solanosystems.com/archives/2007/02/01/detecting-multiple-keypress-combinations-with-prototype/#comment-43327 Great code ! Great code !

]]>
by: Darrick http://www.solanosystems.com/archives/2007/02/01/detecting-multiple-keypress-combinations-with-prototype/#comment-20881 Wed, 09 May 2007 15:23:14 +0000 http://www.solanosystems.com/archives/2007/02/01/detecting-multiple-keypress-combinations-with-prototype/#comment-20881 You can use the event object attribute 'ctrlKey'. event.ctrlKey (true: control key pressed) You can use the event object attribute ‘ctrlKey’.

event.ctrlKey (true: control key pressed)

]]>
by: Mike http://www.solanosystems.com/archives/2007/02/01/detecting-multiple-keypress-combinations-with-prototype/#comment-17138 Mon, 05 Mar 2007 16:34:09 +0000 http://www.solanosystems.com/archives/2007/02/01/detecting-multiple-keypress-combinations-with-prototype/#comment-17138 Thanks, code looks great =) Thanks, code looks great =)

]]>
by: outerference http://www.solanosystems.com/archives/2007/02/01/detecting-multiple-keypress-combinations-with-prototype/#comment-17109 Mon, 05 Mar 2007 10:54:36 +0000 http://www.solanosystems.com/archives/2007/02/01/detecting-multiple-keypress-combinations-with-prototype/#comment-17109 I did something similar at the website above for a shift-click detection. I don't think it can be done without the global variable! check out the demo -&#62; http://www.resonantresident.com/shift-click/ I did something similar at the website above for a shift-click detection. I don’t think it can be done without the global variable!

check out the demo -> http://www.resonantresident.com/shift-click/

]]>