If you mean something like a bar code scanner and you're using a string control, then maybe all you need to do is set the LabVIEW front panel options to "End text entry with Return Key". In my programs that read a bar code, the VI loops until a valid string is seen and entering a return enters the scanned bar code. My scanners are set to append a carriage return.