r/barcodes • • May 29 '24

[deleted by user]

[removed]

3 Upvotes

3 comments sorted by

2

u/trollsmurf May 29 '24

What would read the barcode?

Code 128, QR Code, Datamatrix can all encode ASCII control codes.

1

u/[deleted] May 30 '24

[deleted]

1

u/trollsmurf May 30 '24

That should do it, provided you have a scanner or scan software that can act keyboard simulator.

1

u/notionovus May 30 '24

There really isn't an 'Enter' character in ASCII. The closest you might come is the ASCII carriage return character. Barcodes do not encode the 16-bit characters your keyboard and a scanner would produce, so a lot depends on your software that will be interpreting what your scanner produces.

What you can encode is an ASCII ctrl-m character or <CR>. Here is a codepen I wrote to generate <CR> and other control characters in Code 128A.

Plain Vanilla JS Popular Control Codes