map browser keycodes to ansi characters and escape sequences