Use .keydown() instead.
quote from jQuery . keypress ()
In addition, modifier keys (such as Shift) trigger key change events, but not keypress events.
Fall arrows do not fall into the same category as Shift, but are handled in a special way ... keydown will do the trick.
Update
After your comment, here is an example that works in
- FF 3.5.x and 3.0.11
- IE 6, 7
- Google Chrome 4.0.x
- Safari 4.0.4
It works not only in Opera (Edit: works in Opera 12.16), but it does not work with any key, not with arrows.
About speed you cannot change it from your code .. this is a system parameter (from the BIOS and from the keyboard settings in the control panel -windows-)
source share