Barcode Scanner Emulator
ENTER vs TAB Suffixes in Barcode Scanners
A suffix is a keystroke a scanner sends immediately after the decoded barcode payload. Choosing the right suffix, and handling it correctly in your app, is one of the most common sources of scanner integration bugs.
What suffixes are and why scanners send them
Since a scanner emits the payload as raw keystrokes with no built-in delimiter, the receiving application has no reliable way to know the scan is complete unless the scanner appends an explicit terminator keystroke. That terminator is the suffix. Without one, applications would need to guess completion using an inactivity timeout, which is slower and less reliable.
ENTER (CR)
The most common suffix. Sent as the Enter/Return key, corresponding to carriage return, 0x0D in ASCII. In most HTML forms, pressing Enter inside a single text input submits the enclosing form, which makes ENTER a natural fit for "scan and submit" workflows like a search box or single-field lookup.
TAB
Sent as the Tab key, 0x09. Rather than submitting a form, Tab moves focus to the next focusable element. This suffix is preferred in multi-step data entry workflows, such as scan product code → auto-advance to quantity field → scan next item, without triggering a premature submit.
CR/LF pairs and no suffix
Some scanners can be configured to send a full CR+LF pair (common when feeding terminal or serial-style applications), and some can be configured with no suffix at all, in which case your application must detect scan completion using input timing instead.
Why this matters for POS and web apps
Choosing the wrong suffix produces very specific, confusing bugs: an ENTER suffix on a multi-field form can submit the form before quantity or discount fields are filled in, while a TAB suffix on a single-search-box workflow leaves the search unexecuted because nothing happened to trigger a submit. Matching the suffix to the workflow — not just leaving the factory default — is essential.
How to test suffix behavior
Scan into the Barcode Input Tester, which explicitly reports whether ENTER or TAB was detected at the end of the scan. If you need to see the exact key codes involved (for example, to distinguish CR from LF), use the Keyboard Event Tester instead.
Changing the suffix on your scanner
Suffix behavior is a scanner-side setting, configured either through the manufacturer's software utility or by scanning a special configuration barcode printed in the scanner's manual. See the Barcode Scanner Configuration guide for the general configuration process.