Tag: onKeypress javascript charCode event

A cross-browser keypress detection javascript

We have learning modules that have a lot of pages, and it occurred to me it would be easier on people’s hands if they could simply use the right and left arrow keys to navigate through the module.

After a day of great frustration, I realized that it’s nearly hopeless. Not only do all the browsers report different keycodes for the right and left arrow keys, but Firefox and Safari report both of them as “0” which makes it impossible to distinguish between them.

keys.jpg

Continue reading