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 [email protected]
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