Saltar al contenido principal

Búsqueda

Búsqueda

Scan Barcodes To Do Keyboard Commands

Comentarios

1 comentario

  • Avatar
    Ian Cummings
    Moderador
    Can keyboard control and function characters be encoded into barcodes? The answer is both yes and no!

    Strictly speaking, barcodes cannot encode keyboard control and function keys. The reason is that these keys (F1 - F12) are unique to the hardware and are not an ASCII code. For a PC keyboard, control and function keys are transmitted as keyboard scan codes and have no equivalent ASCII control codes that can be encoded into a barcode. However, there is a work around.

    Many keyboard wedge scanners can be programmed to substitute a control/function key each time they scan a specified character. Since a keyboard wedge reader uses the same data transmission standards as a keyboard, they can send a scan code representing a control+function key.

    For example, if the application will never need a plus sign (+) in the barcode, the keyboard wedge replaces the plus sign with a control+F2 key scan code. Therefore, if "12345+" was scanned from a barcode it would produce the data stream "12345" followed by the control+F2 keys. This same approach may be used even with bar code readers attached to a serial port if a "soft wedge" program is used. This "soft wedge" is a program that takes data from a serial port and treats it as if it had come in through the keyboard. Some of these programs also allow character substitution.

    Start by reading the programming manual of the barcode reader you are using. These can normally be found online as a PDF if you don't have a printed copy. Search on Google to find.
    0

Iniciar sesión para dejar un comentario.