Keyboard Wedge

The Keyboard Wedge Interface

Reference link: 

The keyboard wedge interface is the best way to incorporate barcode technology with data management systems that are already in place. These systems are usually designed to receive input data from a keyboard. As the amount of data increases, new methods of entering the data are sought. Barcoding is the most often thought of alternative to keyboard entry. It is certainly faster than keyboard entry and much less error prone. The question is, how to incorporate a barcode scanner in the place of, or in addition to, the keyboard that was previously used. The answer is a keyboard wedge.

What exactly is a keyboard wedge? A keyboard wedge can be either hardware or software. Let’s look at the hardware type first. It’s called a wedge because it “wedges” in between the system keyboard and the computer console. The wedge interface is built into the barcode scanner.

Physically, the keyboard plugs into the scanner and the scanner plugs into the computer console. When you type on the keyboard, the characters are sent to the computer as usual. When you scan a barcode, the barcoded characters are converted to keyboard “key codes”, and sent to the computer. So, the computer thinks that the data in the barcode was typed on the keyboard.

A software wedge accomplishes the same end result as a hardware wedge. Many barcode scanners manufactured today have RS-232 interfaces. This interface will connect directly to the COM port on a PC, but not to the keyboard connection. A software wedge makes a scanner connected to a COM port look as though it were a hardware wedge connected to the keyboard. It takes the scanner data in, via the COM port, and re-routes it within the PC to the keyboard buffer. The computer thinks the data was typed on the keyboard.

So now you probably think that you know all there is to know about wedges. Well, maybe not. If you’re dealing with a numeric code, like Interleaved 2 of 5 or even Code 39 with numbers and letters, you will probably get along fine without the rest of this information. But, if you’re dealing with full ASCII codes, like Code 128, Code 93 or Extended Code 39, then there is another issue to consider.

The ASCII character set has 128 characters. The standard PC keyboard has 101 keys. So, how do you take every ASCII character that could be in the barcode and translate it to a keyboard key? There are keys on the keyboard that don’t have a corresponding ASCII character. There are ASCII characters that don’t have corresponding keys. To compensate for this, a wedge has some type of translation table. This means that when the barcode reader reads an ASCII character that doesn’t directly translate to a keyboard key, or key sequence, it will translate this to a key, or key sequence, provided by the translation table. Some translations are obvious. When a Carriage Return character (CR) is encountered it is usually translated to the Enter key on the keyboard. The horizontal tab (HT) character usually translates to the TAB key, while the vertical tab (VT) sometimes translates to the Page Down key but also translates to the TAB key with some wedges. Some hardware wedges will let you select several different tables. Some software wedges let you edit the tables yourself. When you are dealing with full ASCII Codes it’s best to check the manual for the wedge to determine what the translation is for the different ASCII characters.

Some sequences that you type on the keyboard may not be able to be duplicated in barcode characters. The two examples of this are Control (Ctrl) and Alt sequences. The problem here stems from the method used to send information from the keyboard to the computer. When you press a key on your keyboard, the keyboard sends a “key down” code for that key to the computer. When you release the key, it sends a “key up” code. So, for every key you press and release, two sets of key codes are sent to the computer. If we want to send an ALT sequence, like ALT-F for instance, the wedge would have to send an “ALT key down”, “F key down, “F key up” and “ALT key up” sequence of key codes. If there is no way of sending just an “ALT key down” or “ALT key up” sequence, ALT sequences may not be able to be incorporated into barcodes. The same is true for Control key sequences. Some newer products do offer this feature, such as our GT-7000 Handleld CCD Scanner. Check with the manufacturer of your hardware or software wedge.