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

Hope this helps :)

--~--~---------~--~----~------------~-------~--~----~
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