overfloweblog
are you driving me crazy?
Browse: Home / prototype

prototype

How well do you know prototype (part II)

By overflow on April 1, 2008

1) Detecting key events easily How do we detect which key was pressed? Prototype provides set of key event aliases so that we don’t have to remember that return is “13″ and escape is “27″. Almost all major keys are aliased: KEY_RETURN, KEY_ESC, KEY_TAB, KEY_LEFT, KEY_UP, KEY_RIGHT, KEY_DOWN. See full list in API docs $(‘myInput’).observe(‘keyup’, [...]

Posted in javaScript | Tagged prototype | Leave a response

Next »

Copyright © 2012 overfloweblog.

Powered by WordPress and Hybrid.