Javascript keycode =/= charcode
That is correct. There is no such mapping you can do; a keydown
may not even correspond to a character being inserted. Or Caps Lock might change the meaning of the keypress, and you can't sniff for that. And various other wrinkles.
If you want to know the character code your only option is to use the keypress
event.