The the setting is on your scanner. By default most scanners send the carriage return (enter key) immediately after the value.
This can be enabled or disabled on the scanner. Please check the scanner's user manual for how to enable sending a carriage return. Once this is enabled it should work as