Move charcode translation code into keyFromCharCode so it catches everything