We recently wrapped up another hackathon. Like I did last summer, I spent my time in javascript. This time, I learned a few things about the key codes browsers send to javascript event handlers when non-alphanumeric keys are pressed.

First, in the modern browsers I tested (FF, Chrome, and (ick) IE9) the forward-slash key is registered as a key code of 191. This surprised me because the ASCII code is 47.

Along the same lines, the question mark key is registered as 191 with a shiftKey value of true. Again, I’d have expected the ASCII code of 63.

Here’s the curve ball in the whole thing. The one really random non-conforming browser is Firefox, which registers the question mark key as a key code of 0 (zero) with a shiftKey value of true. Shame on me for thinking IE would be the oddball.

Unlike the last time I spent time hackathoning in javascript, this project was handled all along with the intent of putting it into production. Keep an eye out for something cool involving the keyboard soon in Rally.

Request a Call

Looking for support?

Send Us Your Feedback

Provide us with some information about yourself and we'll be in touch soon. * Required Field