generate when enter pressed in input