[jQuery] Re: newbie question: keypress vs keydown

2007-06-08 Thread kotouc
Thanks for help Richard What bugs me is that keydown should be fired once. I wonder if it works for you guys that way. I am using the flag. The flag will be assigned x times during the keydown, which "works" however... var SHIFTKEY_FLAG=false; $(document).keydown( function(e){ if(e.shiftKey){ S

[jQuery] Re: newbie question: keypress vs keydown

2007-06-08 Thread Richard D. Worth
On 6/8/07, kotouc <[EMAIL PROTECTED]> wrote: Hi, my problem is that this code returns: keydown keypress keydown keypress keydown keypress keydown keypress keyup jQuery 1.1.2 and FF1.5 Further running: $('textarea').keydown(function(e){console.log(e);}); When I press and hold the key down it

[jQuery] Re: newbie question: keypress vs keydown

2007-06-08 Thread kotouc
Hi, my problem is that this code returns: keydown keypress keydown keypress keydown keypress keydown keypress keyup jQuery 1.1.2 and FF1.5 Further running: $('textarea').keydown(function(e){console.log(e);}); When I press and hold the key down it keeps firing the keydown! Jan On May 21, 11:

[jQuery] Re: newbie question: keypress vs keydown

2007-05-21 Thread james_027
Thanks a lot especially to your second post. :) cheers james On May 22, 11:59 am, "Richard Worth" <[EMAIL PROTECTED]> wrote: > On 5/21/07, Richard Worth <[EMAIL PROTECTED]> wrote: > > > > > On 5/21/07, james_027 <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > Is there a difference between to two?

[jQuery] Re: newbie question: keypress vs keydown

2007-05-21 Thread Richard Worth
On 5/21/07, Richard Worth <[EMAIL PROTECTED]> wrote: On 5/21/07, james_027 <[EMAIL PROTECTED]> wrote: > > > Hi, > > Is there a difference between to two? Any guidelines on which one to > use on a certion situation? > > There are three javascript events that can fire when a key is pressed: keydo

[jQuery] Re: newbie question: keypress vs keydown

2007-05-21 Thread Richard Worth
On 5/21/07, james_027 <[EMAIL PROTECTED]> wrote: Hi, Is there a difference between to two? Any guidelines on which one to use on a certion situation? There are three javascript events that can fire when a key is pressed: keydown keyup keypress Here's a great reference for figuring out wha