Fix history keybindings for keypress

because ASCII != keydown code in JS m(