Catches error if keypress could not be converted to character