Traditionally, the arrow keys overlapped ASCII codes, but were represented to the programmer as a two-byte sequence so you were aware that a special key has been pressed. With the advent of Unicode this is no longer a clean solution.
Browsers have implemented different ways of representing special key input to the Javascript runtime. The details are explained here.
I usually use the 'keydown' event when detecting arrow keys, as this event has the correct keycode attached and will fire with a different keycode(the one for 9) when the user is typing a left parenthesis. This may not work in cases where you want to allow the user to repeat the keyed event by holding down the arrow key.
(you mean holding shift and pressing 9, correct? - James Montagne(does give me 40, which is the ascii code for that character. - James Montagne