Barcode Scanner - replacing part of input

Hello, I am hoping that some one here has an answer for me.
I am using a barcode scanner on my Mac to add product codes into the meta data of images.
The mac recognises a barcode scanner simply as a keyboard and the device transfers the identified barcode as a bunch of number keystrokes plus a CR (return) at the end of the sequence.
Unfortunately this closes the input window in the software I am using but I am attempting to add multiple codes separated by a comma. I had hoped I could fix this problem with key sequences in BetterTouchTool and only replace the CR in the sequence with a comma but I am unable to do that so far as I can not disable the other earlier keystrokes in the sequence.
In case this is confusing. A typical input is a sequence like this


I want to replace the CR in this or any other sequence coming from this device by a comma.
Does anybody have a suggestion how this could be achieved?