Barcode scanner configured to move between data entry fields after scanning

How to Add Enter or Tab After a Barcode Scan: Prefix and Suffix Guide

Many barcode scanner problems are not decoding problems at all. The scanner reads the symbol correctly, but the application leaves the cursor in the same field, requires an extra keyboard press, or receives unwanted characters. In most cases, the solution is to configure a data suffix such as Enter or Tab—or to review how the scanner is sending data to the host.

This guide explains how barcode scanner prefixes and suffixes work, when to use Enter or Tab, and how to test the complete workflow without creating duplicate submissions or damaged data.

What are barcode scanner prefixes and suffixes?

A barcode contains the data encoded in the printed symbol. After decoding it, a scanner can add characters before or after that data before transmitting it to the computer, POS terminal, tablet or embedded controller.

  • Prefix: data added before the decoded barcode.
  • Suffix: data added after the decoded barcode.

For example, if the barcode contains ABC123, a scanner configured with an Enter suffix may send ABC123 followed by the equivalent of an Enter key. A Tab suffix may send the same data and move the cursor to the next field.

Formatting may be performed in the scanner firmware, a mobile data-capture service, middleware or the receiving application. Zebra's DataWedge documentation, for example, describes basic formatting options that can add prefixes, suffixes, Tab and Enter before data is passed to an application. The exact menu names and programming barcodes vary by manufacturer.

When should you add Enter after a barcode scan?

Enter is useful when the host application expects the operator to confirm a completed value. Common examples include:

  • Submitting an item code in a POS search box
  • Confirming a warehouse location or inventory ID
  • Starting a database lookup after a serial number is scanned
  • Advancing a command-line or terminal workflow
  • Completing a web form field that is designed to submit on Enter

Do not assume that Enter is always correct. In some web applications, Enter submits the entire form. If staff must scan several fields before submission, an Enter suffix can trigger the process too early or create duplicate records.

When should you add Tab after a barcode scan?

Tab is usually better for multi-field data entry. It moves focus to the next control without necessarily submitting the form. A receiving workflow might ask the operator to scan a purchase order, item code, lot number and quantity in sequence. With a Tab suffix, each scan can place the cursor in the next field.

However, the order of focus is controlled by the application. Test the actual screen because hidden buttons, pop-up controls or a poorly configured web form can interrupt the expected Tab order.

Carriage return, line feed and Enter are not always identical

Configuration manuals may use terms such as Enter, carriage return (CR), line feed (LF), CR+LF or terminator. These terms are related, but a receiving system may treat them differently.

  • CR: commonly represented as hexadecimal 0D.
  • LF: commonly represented as hexadecimal 0A.
  • CR+LF: a two-character sequence used by some serial and text protocols.
  • Keyboard Enter: a key event generated in keyboard-emulation mode.

A USB HID scanner may emulate a keyboard Enter key, while a serial scanner may transmit one or two control bytes. The application, driver and interface determine what the host finally receives. If a suffix works in a text editor but fails in the production application, capture the transmitted data or consult the software provider rather than repeatedly changing scanner settings.

How to configure an Enter or Tab suffix

Most scanners support one or more of these methods:

  1. Programming barcodes: scan configuration symbols in the product manual.
  2. Configuration utility: connect the scanner to a PC and select the required terminator or data-formatting rule.
  3. Host commands or SDK: an integrator sends configuration commands from an application.
  4. Mobile data-capture profile: an Android service adds keystrokes or characters before delivering data to an app.

Before changing anything, record the scanner model, firmware version, interface mode and current configuration. Use the programming guide for the exact model. A setup barcode intended for another product family may do nothing or apply a different command.

Recommended configuration sequence

  1. Confirm that the scanner decodes the target barcode correctly.
  2. Identify the active output interface: USB HID, USB virtual COM, RS232, Bluetooth HID or another protocol.
  3. Decide whether the workflow needs Enter, Tab, CR, LF or CR+LF.
  4. Apply only that change.
  5. Test in a plain text editor to see the basic output.
  6. Test again in the production POS, ERP, WMS, browser or mobile app.
  7. Save or export the approved scanner configuration for deployment.

For a comparison of common output modes, see our guide to USB HID, USB COM, RS232 and Bluetooth barcode scanner interfaces.

When a prefix is useful

A prefix can tell an application where the data came from or how it should be processed. Examples include a start character required by a legacy host, an application hotkey or a short identifier that separates scanner input from manually typed data.

Prefixes should be used carefully. If the receiving software expects the raw GTIN, serial number or tracking code, added characters can prevent a match. It is usually safer for the application to identify its input channel directly, especially when the same scanner is used across several screens.

Advanced data formatting

More complex workflows may need rules instead of one universal suffix. Advanced formatting can be used to:

  • Add a suffix only for a particular symbology
  • Remove known leading or trailing characters
  • Extract one section of a fixed-length code
  • Replace delimiters
  • Send different output for different barcode lengths
  • Control the order of data from multiple barcodes

Keep the rule set as simple as possible. Complex transformations inside the scanner can be difficult to audit, reproduce and troubleshoot. If business logic changes frequently, middleware or the host application may be a better place to format the data.

Common problems after adding a suffix

The scanner reads the code but nothing moves

Check whether the scanner is really in keyboard-emulation mode. A virtual COM or serial device sends data to a port and does not automatically create keyboard events. The application must open the correct port and interpret the terminator.

The cursor skips two fields

The scanner and the application may both be adding Tab, or the barcode itself may contain a control character. Test the raw output, disable one formatting layer and confirm the result.

The form submits twice

Look for duplicate Enter characters, CR+LF being treated as two actions, or application code that submits both on a key event and after a successful lookup.

Extra characters appear before or after the data

Review prefix, suffix, symbology identifier and code-ID settings. Also check whether GS1 separators are being displayed as visible characters by the test application.

It works in a text editor but not in the business application

The application may intercept key events, reject the input length, require a different field focus or expect serial data. Test with the software provider and document the exact output string.

Deployment checklist

  • Use the correct programming guide for the model and firmware.
  • Verify the output interface before applying formatting.
  • Confirm the required terminator with the application owner.
  • Test short, long, numeric, alphanumeric and GS1 barcodes.
  • Test every screen where the scanner will be used.
  • Check for double submissions and skipped fields.
  • Record the approved configuration and label the device profile.
  • Retest after firmware, operating-system or application updates.

Choose a scanner that fits the host workflow

Prefix and suffix support is a small feature with a large effect on daily productivity. The right configuration can remove repetitive keyboard steps, but it must match the interface and the software that receives the data.

If you are selecting equipment for a retail, warehouse, kiosk or OEM project, explore our industrial and commercial barcode scanners or contact WODEMAX with your interface, barcode types and sample workflow. We can help confirm the required scanner format before deployment.

Reference: Zebra DataWedge Basic Data Formatting documentation.

Back to blog