Questions? Search our site or call us at 1-800-722-6004

Barcoding Keystrokes

Barcodes can only contain ASCII Characters. Certain Keystrokes have corresponding ASCII Characters, such as Tab (ASCII 9), ESC (ASCII 27) and Enter (ASCII 13), while others do not - for example Function Keys F1-F12. Furthermore, certain barcode symbologies have restrictions on the kind of data that can be encoded - UPC codes can only contain numerical data, so encoding a tab character after the numbers would not be possible.

For those keystrokes that cannot be encoded, or for symbologies that do no support those which do have ASCII equivalents, you must add the extra keystrokes another way.

Adding Keystrokes using the scanner

Most Barcode scanners have options to add a prefix and/or suffix of keystrokes or ASCII characters. For Example, using the Metrologic Eclipse Scanner you can add up to 10 configurable prefix characters and 10 configurable suffix characters by scanning special bar codes in the manual to identify the prefix or suffix based on the ASCII value. Other codes Enable and Disable commonly used characters like carriage returns.

Adding Keystrokes using a software wedge

BC-Wedge allows you to add a single keystroke as a suffix to the data transmitted by an RS-232 Scanner (Enter, Tab, Left, Right, Up or Down. WinWedge allows you to add a ANY keystroke(s) or ASCII character(s) before your data, after your data or even in the middle of your data. WinWedge also supports DDE (Dynamic Data Exchange) which allows you to write code in applications such as Excel or Access that will give you full control over where the data goes and how it is parsed and filtered.

Adding Keystrokes by creating barcodes

For keystrokes that do have an ASCII Character and can therefore be encoded into a barcode it is possible to create a barcode for each keystroke. Simply select a barcode symbology like Code 39 Full ASCII or Code 128 and select the character from the ASCII Chart that represents your keystroke. You can print out a number of Barcodes that perhaps have a comment above them telling you what they are: Enter, Esc, Tab, Space, etc. Then you simply scan the barcodes in order e.g. Tab, UPC Code, Enter.

If you are generating your barcodes in another program using our ActiveX control, you'll need to find out how to format a ASCII value as a character. For instance if you are generating a query in Access, you can use Chr$(9), where 9 is the ascii value. 

Special considerations when using this technique

  • You must select a barcode symbology that supports the ASCII Characters you are trying to encode.
  • You must make sure the symbology you selected is enabled on your scanner. If you select Code 39 Full ASCII but do not enable it on your scanner, the scanner will decode the barcode using regular code 39, in which case your Tab Keystroke may become something like "$I".
  • Make sure that the "Minimum Symbol Length" (if you scanner has such a setting) is set to 1 character. The Metrologic Eclipse Scanner has a default minimum symbol length of 3 characters. Thus it will not read a single character barcode unless you reconfigure using the manual. To Reconfigure the Eclipse scanner follow these steps:
    • Scan the Enter/Exit Configuration Mode symbol on P.2 of the manual.
    • Scan the ~Minimum Symbol Length symbol on P.13.
    • Scan the Code byte 0 on P.84.
    • Scan the Code byte 0 on P.84.
    • Scan the Code byte 1on P.84. (this sets the minimum length to 001).
    • Scan the Enter/Exit Configuration Mode symbol on P.2 of the manual.

Categories: Tutorial / How-To

Last Updated: 2012.10.31

Need more help?

Don't hesitate to call or email us with your questions

Our office is open 9AM - 5PM Monday Through Friday (E.S.T.)

Technical Support: 215-496-0202

Toll-Free: 1 (800) 722-6004
Skype: taltech1 (Voice only)
Email: support@TALtech.com