Fixed typing messages. Changed input keypress event to keydown to detect backspace and use keyCode instead of charCode for Firefox.