change charCode to keyCode to capture backspace and sheet