improved auto-dash in input