Deutsch

Guide

Barcode scanner for PC: handheld scanner, webcam or screen?

For lots of barcodes on paper, a USB handheld scanner is the simplest option: it works like a keyboard on the PC and types each code into the field where the cursor is – no extra software needed. For the occasional code, especially QR codes, and for codes that are already on the screen, software that reads from a webcam or straight from the screen is enough.

Last updated: · ICT Baden

USB and Bluetooth handheld scanners: the scanner as a keyboard

A barcode scanner for the PC usually works as a keyboard – this is called keyboard emulation or a “keyboard wedge”. Windows recognises it as an ordinary keyboard and already includes the drivers it needs. Every code arrives as a series of keystrokes wherever the cursor is: in Excel, in a form of your ERP system or in the search box of a web shop. Many devices can be set to send Enter or Tab after the code.

Bluetooth models connect through their own receiver on a USB port or directly via Bluetooth and type the same way. Many scanners also offer modes for programs with their own scanner integration, such as a serial interface or “HID POS”. For typing into any program, keyboard mode is the usual way.

Check the type before you buy: laser scanners and linear scanners read barcodes (1D) such as EAN or Code 128, some also stacked codes such as PDF417 – but not QR codes or Data Matrix. Those need a 2D imager, which takes a picture of the whole code.

A classic pitfall is the keyboard layout: the scanner types according to the layout it is set to. If that does not match the layout in Windows, wrong characters arrive – with a German layout, for example, Y instead of Z. The fix is the configuration barcode for the matching country layout in the scanner’s manual.

A handheld scanner pays off when codes on paper, labels or goods are read regularly: aim, pull the trigger, done – even for many codes in a row. The price is one device per workstation.

Webcam as a barcode scanner – the laptop camera included

Without extra hardware, the webcam can do the job, for example the built-in camera of a laptop: you hold the code in front of the camera, and software recognises it in the video image. On Windows 10 and 11 the Windows Camera app already has a mode for this: for a QR code it shows the link, for a barcode the text, which you can copy to the clipboard. For the occasional code, that is enough.

The limits lie in the camera. For the camera barcode scanner in Windows, Microsoft recommends a camera with autofocus and at least 1920 × 1440 pixels; codes with thin bars may need a higher resolution, while codes printed large also work with less. A fixed-focus webcam shows a code sharply only at one particular distance, and there it is often already small. With a barcode, the width of every single bar matters – which is why small barcodes are harder for a simple webcam than a QR code. Good light and holding the code still help.

If the code should go straight into a program rather than just being displayed, you need software that types like a handheld scanner – see keyboard wedge software.

Read a QR code from the screen: screenshot, PDF, e-mail, video call

Often the code is not on paper at all but already on the screen: in a PDF invoice, an e-mail, on a web page or in a shared screen during a video call. In that case, pointing a scanner at the monitor or holding a phone in front of it is a detour. Software that reads straight from the screen takes the code exactly as it is displayed – no camera, no blur, no reflections.

In Lupe this works with a hotkey: press Win+Shift+Q in any program and drag a rectangle around the code, across all monitors; a click without dragging takes the whole monitor. Saved screenshots and images can be opened, dragged into the window or pasted from the clipboard with Ctrl+V. There is a limit here too: if a barcode is shown heavily reduced, for example in a half-size preview, the resolution is often not enough – zoom in or open the original.

Keyboard wedge software: type codes into Excel and forms without a handheld scanner

The big advantage of a handheld scanner is that the code lands in the right field without a detour. Software can do that too: it passes the result to the program as keyboard input, as if someone had typed the code – a keyboard wedge without extra hardware.

In Lupe this action is called “Type” and is switched on in the settings; out of the box, Lupe only copies to the clipboard. After a screen scan, Lupe types into the window that was active before the scan. From the webcam it types every recognised code into the program in front – the webcam then works like a handheld scanner. Enter or Tab can follow. Lupe types with Unicode input, independent of the keyboard layout, so umlauts and special characters arrive in an ordinary input field exactly as they are in the code.

The limits: Lupe cannot type into programs that run as administrator – it detects this and says so. Programs that read raw key codes instead of characters, such as some remote-desktop or terminal programs, may not accept the Unicode input; copying helps there. And control characters are not typed, such as the group separator in GS1 codes; the clipboard keeps them.

Phone apps: handy on the go, awkward at the PC

The camera app of many smartphones recognises QR codes by itself – ideal for a link on a poster or a package. But if the content is needed on the PC, the detour begins: the result is on the phone and first has to get to the PC by e-mail, chat or sync.

Apps that turn the phone into a scanner for the PC come in two kinds: some send the codes over the local network to a program on the PC, others – on Android 9 or later – connect to the PC via Bluetooth like a keyboard and need no software there. Both work, but you have a second device in your hand for it. And using the phone to photograph a code that is already on the PC screen remains a detour twice over.

Reading Data Matrix and GS1 codes on a PC

Data Matrix is the small square 2D code found, for example, on many medicine packs in the EU. It is read like a QR code: with a 2D-capable handheld scanner, with a webcam, or straight from the screen when it is in a PDF or a photo.

Lupe reads Data Matrix in square and rectangular form, plus GS1 formats such as GS1-128 and GS1 DataBar – 22 formats in total. In GS1-128 an invisible control character separates fields of variable length: copying keeps it, typing drops it. GS1 DataBar Expanded is output with the field numbers in brackets.

Lupe: webcam, screen and files in one program

Lupe is our QR code and barcode reader for Windows, Linux and macOS. It brings together the options that need no extra device: codes from a webcam, from any part of the screen, from image files and from the clipboard, in 22 formats from QR Code and Data Matrix to EAN-13 and Code 128. The result is copied, typed or opened as a link through a link rule; everything read is kept in a history with CSV export for Excel. For scripts there is a command line (Lupe.exe read *.png). Lupe works offline, without telemetry, and is free of charge under the MIT licence.

Honestly: Lupe is a pre-release (0.1.1) and not code-signed yet – Windows warns on first start. The camera has been tested against a simulated frame source only, not with a real webcam; it uses a picture of about 1280 × 720 pixels and does not set focus or exposure itself, so small codes need to come close to the camera. Linux and macOS are newer and less tested than Windows: on a real Mac, Lupe has so far only been started – screen scan, typing and the hotkey have not been tried there yet; on Wayland they depend on desktop portals that not every desktop offers. The download follows with the public release.

Our product

Lupe – QR code and barcode scanner for the PC

Webcam, screen by hotkey, image files and clipboard – copy, type or open as a link; for Windows, Linux and macOS.

Status: Coming soon · Coming soon

Barcode scanners for PC compared

Ways to read barcodes on a PC compared
OptionHardwareCostBarcodes (1D)QR and Data Matrix (2D)Types into programsOffline
USB or Bluetooth handheld scannerscanner per workstationbuying the deviceyesonly with a 2D imageryes, as a keyboardyes
Webcam with softwarewebcam, often built independs on the softwarelimited, small codes are hardyesdepends on the softwaredepends on the software
Software for screen and filesnonedepends on the softwareyes, if shown large enoughyesdepends on the softwaredepends on the software
Phone appsmartphoneoften freedepends on the appyesonly with a suitable app: over the network or as a Bluetooth keyboarddepends on the app
Lupe (ICT Baden)none, webcam optionalfree of charge under the MIT licenceyes; limited from the webcam (picture about 1280 × 720)yesyes, with exceptions such as administrator windowsyes

“Depends on the software”: features and prices differ from program to program. The Windows Camera app on Windows 10 and 11 reads QR codes and barcodes from the webcam and shows the result.

Which option fits when?

  • Many codes on paper, labels or goods

    A handheld scanner in keyboard mode. If QR or Data Matrix codes come up too, a model with a 2D imager.

  • Now and then a QR code on paper

    The webcam is enough: the Windows Camera app to display it, software such as Lupe if the result should be processed right away.

  • The code is already on the screen

    Software that reads straight from the screen – in Lupe with Win+Shift+Q, without a camera or a phone.

  • The content should go into Excel, an ERP system or a form

    A handheld scanner, or keyboard wedge software that types the result.

  • Many image files or scans

    Software that reads files; Lupe’s command line reads many images at once, for example all PNG files in a folder.

  • On the go, without a PC

    The smartphone’s camera app.

  • Linux or Mac instead of Windows

    A handheld scanner in keyboard mode works as a keyboard there too. As software, Lupe is also available for Linux and macOS, where it is newer and less tested.

Frequently asked questions

Do I need a driver for a USB barcode scanner?

Usually not. In keyboard mode the scanner registers as a keyboard, and Windows already includes the drivers it needs; the code appears wherever the cursor is. A manufacturer’s driver is only needed for special modes at most – and even for “HID POS”, which programs use to control a scanner directly, Windows has its own driver.

Can I use my webcam as a barcode scanner?

Yes. On Windows 10 and 11 the Windows Camera app already recognises QR codes and barcodes. Lupe can also type every recognised code into the program in front, like a handheld scanner; its camera function has, however, only been tested against a simulated frame source so far. It works best with QR codes and barcodes printed large; small barcodes need to come close to the camera, and a camera with autofocus helps.

How do I read a QR code from my screen without a phone?

With software that reads the screen. In Lupe, press Win+Shift+Q and drag a rectangle around the code – in a PDF, an e-mail, on a web page or in a video call. The content goes to the clipboard and, if you like, is typed into the previous window. Lupe is currently a pre-release (0.1.1). The download follows with the public release.

Can every barcode scanner read QR codes?

No. Laser scanners and linear scanners read barcodes (1D), but not QR codes or Data Matrix codes – those need a 2D imager that takes a picture of the whole code. Lupe reads both, from a webcam, the screen and images.

Why does my barcode scanner type the wrong characters?

Usually because the scanner’s keyboard layout does not match the one in Windows – with a German layout, for example, Y and Z are swapped. The configuration barcode for the matching country layout in the scanner’s manual fixes it. Lupe types with Unicode input and therefore does not depend on the keyboard layout.

Is there a barcode scanner for Linux or Mac?

Handheld scanners in keyboard mode work as a keyboard there too. As software, Lupe is also available for Linux (x64 and arm64, X11 and Wayland) and for macOS 12 or later; both versions are newer and less tested than the Windows one, and on a real Mac Lupe has so far only been started. The download follows with the public release.

More guides

QR Code is a registered trademark of DENSO WAVE INCORPORATED. Microsoft, Windows and Excel are trademarks of the Microsoft group of companies, macOS and Mac are trademarks of Apple Inc., Android is a trademark of Google LLC, Linux is a registered trademark of Linus Torvalds; Bluetooth is a registered trademark of Bluetooth SIG, Inc., GS1 a registered trademark of GS1 AISBL, Unicode a registered trademark of Unicode, Inc. They are named only to describe features and compatibility.

Contact

Questions about your setup?

Tell us what you are looking for – we will get back to you personally.

info@ict-baden.de +49 172-7207196

Seboldstraße 9, 76227 Karlsruhe, Germany · Directions