Update keypress to use charCode instead of keyCode