Improve normalization of charCode, fix FF not reporting Enter

#1955

Haven't tested it yet (it's late), I'll run it through some manual tests tomorrow.
I thought "we" preferred this style, I hate it though so I'm all too happy to change it :)

Fixed.