supposed to have resolved problems due to charCode on keypress events