Paula Laneri
2006-Mar-22 19:15 UTC
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!
Gregory Hill
2006-Mar-22 19:24 UTC
RE: Capture/Observer keys (F11, F3, ALT+arrows, CTRL+C/V/X)
Try: Event.observe(window, keypress, function (e) { alert(e.keyCode); }); Greg> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org[mailto:rails-spinoffs-> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Paula Laneri > Sent: Wednesday, March 22, 2006 12:15 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.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 andF11.> 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-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Ryan Gahl
2006-Mar-22 19:26 UTC
RE: Capture/Observer keys (F11, F3, ALT+arrows, CTRL+C/V/X)
Greg, small typo... need quotes around "keypress" :-) Event.observe(window, "keypress", function (e) { alert(e.keyCode); }); The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.
Gregory Hill
2006-Mar-22 19:28 UTC
RE: Capture/Observer keys (F11, F3, ALT+arrows, CTRL+C/V/X)
Oops, haha, damn I''m tired today. Greg> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org[mailto:rails-spinoffs-> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Ryan Gahl > Sent: Wednesday, March 22, 2006 12:27 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] Capture/Observer keys (F11, F3, > ALT+arrows,CTRL+C/V/X) > > Greg, small typo... need quotes around "keypress" :-) > > Event.observe(window, "keypress", function (e) { alert(e.keyCode); }); > > The information transmitted in this electronic mail is intended onlyfor> the > person or entity to which it is addressed and may containconfidential,> proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in relianceupon,> this information by persons or entities other than the intendedrecipient> is prohibited. If you received this in error, please contact thesender> and > delete the material from all computers. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Ryan Gahl
2006-Mar-22 19:32 UTC
RE: Capture/Observer keys (F11, F3, ALT+arrows, CTRL+C/V/X)
Lol, np, that''s what we''re here for... backup :-) The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.