Converts jQuery key events to ASCII character codes.