On 4/15/07, Matthew Kwiecien <[EMAIL PROTECTED]> wrote:
> I suggest looking at these two references to get the hang of events:
> http://www.quirksmode.org/js/introevents.html
>  http://www.quirksmode.org/js/events_compinfo.html
>
> You're going to test by key ranges basically. After the keypress event,
> you'll test event.keyCode against the different key codes. If it matches a
> restricted key code (or doesn't match an allowed one, depending on how you
> approach it), you'll send an event.preventDefault;
>
> It should look something like this (warning: pseudo-code):
> connect('elem','keypress',function(evt){ if (evt.keyCode <
> 43 or evt.keyCode > 98) evt.preventDefault(); });
>
> I'd also suggest poking around here if you have any issues:
> http://developer.mozilla.org/en/docs/DOM:element
>
> As for each key's codes, I'll leave that to you and google. ;p
>

A lot of the special keys are handled by Signal, check the source:
http://svn.mochikit.com/mochikit/trunk/MochiKit/Signal.js

We'll have to add that table to the docs before next release.

-bob

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" 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/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to