Try: Event.observe(window, keypress, function (e) { alert(e.keyCode); });
Greg > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:rails-spinoffs- > [EMAIL PROTECTED] On Behalf Of Paula Laneri > Sent: Wednesday, March 22, 2006 12:15 PM > To: rails-spinoffs@lists.rubyonrails.org > Subject: [Rails-spinoffs] Capture/Observer keys (F11, F3, > ALT+arrows,CTRL+C/V/X) > > > Hi all, > I really appreciate all of you who are behind this great proyect. > Im from Argentina (if you dont notice for my accent eheheh) > > Im trying to capture width the func Event.observe() the keys F3 and F11. > Also the combinations for ALT and the arrows keys, and other > combinations like: > CTRL+X (cut) > CTRL+C (copy) > CTRL+V (paste) > > Using something like this: > Code: > Event.observe(window, keycode=122, function(e){ alert('key f11') }); > > > Here is the error: keycode=122 > But I dont know how to reference the key that I what to capture.. > > Suggests?? > > Thanks a lot and excelente work with this librarys!!!!!!!!!!!!!! > > > -- > Posted with http://DevLists.com. Sign up and save your time! > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs