Thanks TJ. Does anyone have thoughts on this? The solution proposed by tancurrom seems kind of long. I would think that proto would have the cross- browser keydown stuff already built in.
On Mar 7, 7:07 am, "T.J. Crowder" <[EMAIL PROTECTED]> wrote: > For other readers: Several replies in louis' cross-posted > threadhttp://groups.google.com/group/prototype-core/browse_thread/thread/50... > > As kangax indicated, best to continue the discussion (if needed) here > in spinoffs, not there in core. > > On Mar 6, 4:44 pm, louis w <[EMAIL PROTECTED]> wrote: > > > I am trying to detect if the control key has been pressed to change > > and action. I am using the latest proto build. > > > Here is my code: > > > <script type="text/javascript"> > > document.observe('keydown', function(k) { > > if (k.keyCode != 17) return; > > alert('ctrl'); > > }); > > </script> > > > For the control key, it will only trigger the alert every other time > > the key is pressed. For other keys it works every time thou. > > > Can you offer any advice. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
