Escape characters in barcodes

Hi team,

I would like to generate a barcode in Tulip. this barcode will be scanned in an external system.

The barcode currently contains multiples values (3) separated by “" ( ABC_123_XYZ).
Instead of the "
”, I would like to have an escape character (Tab), so I can fill in three fields in the external system with only one scan.

Field1: ABC
Field2: 123
Field3: XYZ

How can I build this?

Much appreciated!
Best regards,


Hey @safe-

Just to make sure I understand correctly-

You are basically looking to add simulated keypresses into that string of values so in another system?

I played with this for about an hour yesterday and couldn’t find a solution that worked to paste into something like google sheets. Generally “\t” is the escape character for a tab, so I make a trigger to replace the _ with \t values, but that doesn’t seem to successfully enter tabs when copy/pasted.

I’d be a little curious of your usecase to better understand if there is another avenue to do this. Generally keypresses are handled as a special type of event that cant be encoded in a string. I can’t think of a product I have ever used that has this sort of functionality, which leads me to believe it isn’t technically possible.


Hey @Pete_Hartnett,

Exactly, you understood the use case perfectly.

I tried the same thing you did using “\t,\n,…” as well, but no success.
I watched a video (link: How to Create a Barcode with Control Characters like TAB or ENTER - YouTube) where the use of those elements is successful, and was wondering if the same logic could work if we insert those simulated keypresses in the expression editor used to create the barcode in Tulip.


Hey @safe -

This send me down a rabbit hole to see how they are doing this!

So a few things I found-

  1. The tab and return are being applied by the barcode scanner that supports code39/128 as part of their standard. The way this works (in the case of code128) is the barcode is encoded with the Allow Tilde flag set to true, and when that is the case “~009” is interpreted as a tab and “~013” is interpreted as a carriage return.
  2. From there, the barcode scanner looks for those strings, and if it sees them it simulates the keyboard input, but all of this is handled in the code128 firmware.

Here are a few great resources:

I tested with code: this~009is~009a~013test and it worked as expected

This means a few things-

  • Because the decoding is happening in the barcode scanner driver, there isnt any way to duplicate this behavior with something like text copied to the clipboard. The barcode scanner driver is literally passing a "I just clicked Tab’ command and the computer doesnt know any different.
  • Support for the allow Tilde flag is limited, the above linked generator is the only free one I could find, but this appears to be the same mechanism that youtube guide is using in the background.

Hope this context helps, this was a really interesting investigation.