Oh, tested in IE7 and FF2.
If i type really fast, then I found that I had multiple kd-kp events
followed by several ku events, but the kd always prefixed the kp event.
Not sure about opera/safari.
IE7 had charCode in kp keyCode and FF had 0.
The quirks mode article might help.

Gareth

On Nov 9, 2007 1:32 PM, Gareth Evans <[EMAIL PROTECTED]> wrote:

> Just tested with this:
>
>     <input id="inputbox" />
>     <div id='debug'>
>
>     </div>
>     <script language="javascript">
>     $('inputbox')
>         .observe('keydown', function (e) { $('debug').insert('Keydown ' +
> e.keyCode + '<br/>'); })
>         .observe('keyup', function (e) { $('debug').insert('Keyup ' +
> e.keyCode + '<br/>'); })
>         .observe('keypress', function (e) { $('debug').insert('Keypress '
> + e.keyCode + '<br/>'); });
> </script>
>
> And found that on normal keys, it always seemed to fire down-press-up, and
> if you were holding a key, down-press-down-press-down-press-down-press-up
>
>
>
> On Nov 9, 2007 1:21 PM, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
>
> > On Nov 9, 2007 1:11 AM, Gareth Evans <[EMAIL PROTECTED]> wrote:
> >
> > > Mislav,
> > >
> > > Looking forward, would observing the keydown event *as well* as the
> > > keypress event when the keypress event is observed and copying the keycode
> > > property to the keypress event object be an option?
> >
> >
> > For those who need keypress this may be an option, yeah. I must admit I
> > never though about forwarding the code from keydown to keypress. Do you
> > believe the technique would stay solid with rapid keypresses and key
> > combinations?
> >
> >
> > > >
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to