Well, I'm trying real hard *not* to look for control codes in keypress, but when I press F5 then keypress is firing and the evt.key().string is "t", while the evt.key().code is 116. If I press the "t" key I get the exact same results. Now, if I dive down to the native event, the evt.event().keyCode is 0 for "t" and the evt.event().charCode is 0 for F5, but that's the only way I can tell them apart right now. I'm trying to filter non-printing keys out, so I need some way to detect F5 in keypress so I can ignore it.
--Dethe On 3/28/06, Beau Hartshorne <[EMAIL PROTECTED]> wrote: > You shouldn't try looking for control codes in keypress, you need to > look for them in keydown or keyup. In keydown or keyup, evt.key > ().string will contain 'KEY_F5' and evt.key().code will be 116. > > On 28-Mar-06, at 10:52 AM, Dethe Elza wrote: > > > I'm trying to use signals and getting some weird errors with > > onkeypress. The evt.key() object doesn't give me any information to > > distinguish control codes (F5, for instance) from normal keys (F5 > > looks like "t"). > > > > I'm using MochiKit packed, from the trunk (circa yesterday), and the > > issues I'm seeing are with Firefox 1.5.0.1 on WinXP SP2. Is there a > > patch I need to apply, or should I just not be using the packed > > version? Any suggestions appreciated. > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~----------~----~----~----~------~----~------~--~---