Handled pressing special keys failed to add to string in keypress