Using an NFC Reader as Keyboard Entry Device

Using an NFC reader to enter keystrokes generated from NFC tag scans is becoming more common. This article describes the various approaches and solutions.

Sep 24, 2018 - 5 minute read

Using an NFC Reader as Keyboard Entry Device

Over the past couple of years, we’ve helped customers achieve keystroke entry from an NFC tag. Barcode scanners have for years come with this as a standard feature yet NFC readers for the most part don’t come with this capability in a built in or plug and play fashion. In this article we’re going to discuss this topic and the various solutions to this problem.

Types of USB and Bluetooth Peripherals

Popular communication protocols can host many types of peripherals such as headphones, flash drives, and even heart rate monitors. Human input devices (HIDs) are just one type which makes it easy for keyboard and mouse products to be compatible across all devices without installing drivers. In technical parlance this is called device enumeration - how does a device present itself to the operating system?

There are a few readers on the market that enumerate as keyboards. Some only input tag unique IDs and offer no data reading capability which is often needed. Those offered by large OEMs are complex to configure and designed for system integrators. However most all purpose NFC readers are designed for desktop applications and enumerate as PC Smart Card readers (PC/SC). This is great for reader interchangeability but unfortunately makes them unable be a plug and play keyboard. The operating system simply doesn’t expect keystrokes to come from this device and therefore won’t enter any data received from it as such.

At the moment TapTrack Tappy readers don’t enumerate as keyboards either. The TappyUSB enumerates as a USB serial port and the TappyBLE enumerates as a proprietary BLE device. In these cases developers often turn to middleware to achieve NFC keyboard entry capability, where a piece of software connects to the reader and emulates keystrokes. The feasibility of this middleware depends on the platform and SDK support as we will discuss in the next section. At TapTrack we aimed to achieve an elegant middle ground in the near term using our existing readers with the hope to soon make them available as true plug and play keyboard devices.

Keyboard Entry Middleware on Windows

The excellent integration of Windows with the .NET framework and Visual Studio development tools makes keyboard entry middleware on Windows a simple matter. There are libraries available that support emulated keystrokes with just a few lines of code in a .NET C# application. There are various Windows utilities that TapTrack offers that enable NFC keyboard entry with full tag reading as well as support for both TappyUSB and TappyBLE variants. Best of all, because all of our NFC utilities are fully open source customizing them to your specific needs (such as custom NDEF record parsing) is not a big development effort.

NFC Keyboard Entry using the Tappy Windows Utility

As of version 2.3, The general purpose Tappy Windows demo tool has a keyboard wedge utility added to it as shown below. When active, the utility will enter any text records found in NDEF messages discovered on scanned tags as keyboard entry. This utility works with both TappyUSB and TappyBLE models. Future releases will also accept URLs.

Tappy Windows Utilty Keyboard Entry Demo

Tappy Windows Utilty Keyboard Entry Demo

NFC Keyboard Entry with automatic configuration upon bootup

Some clients have insisted that NFC keyboard wedge functionality be automatically engaged when the PC starts up. Such a feature greatly simplifies operations by reducing the setup needed by users. For this purpose, we’ve made a tool for Windows that can achieve this by providing a simple command line tool that connects to a Tappy and automatically begins scanning for NFC tags to enter as keystrokes. To have it run when the PC boots up, just place it in the “Startup” folder in Windows. Use a simple batch file to configure the tool with non default options.

NFC Keyboard Entry on Windows with Bluetooth Connection Monitoring

For TappyBLE applications where the operator is far away from the PC there may be a need for a higher reliability setup where the reader only accepts scans when the Bluetooth connection is healthy. For example, a utility operator client explained that workers scan equipment tags while elevated with the laptop located on the ground. It needed a workable wireless NFC keyboard entry on Windows and with elevated workers in harms way a silent failure in the Bluetooth connection would be unacceptable. When set to stream NFC tag information, the TappyBLE will continue to accept scans even if the Bluetooth connection is dropped such that operator thinks data is still being entered as keystrokes when in fact the connection has been dropped. The TappyBLE heartbeat keyboard wedge utility addresses this concern and monitors the health of the Bluetooth connection while reading NFC tag data for keyboard entry. If you’re interested in more detail we’ve written an application note that describes the various options for NFC keyboard entry over Bluetooth on Windows.

NFC Keyboard Entry on Android

For Android-based solutions, we have a keyboard app that integrates with our Tappy External NFC app to provide a method of entering either NDEF or UID data from NFC tags using TappyUSB or TappyBLE readers.

Get it on Google Play

Making the Tappy reader into a true keyboard device

The Tappy reader line is evolving and we’re always looking to improve the product with useful innovations. We may offer a variant of the Tappy with true keyboard entry capability free of middleware or an adapter that would turn any Tappy into a keyboard entry device. If you’d be interested in this, please sign up below to be notified of this product’s release.

David Shalaby

David Shalaby is CEO of TapTrack and has been working with NFC technology since 2011. He has helped countless TapTrack customers with NFC projects and also developed custom NFC readers for some clients. David has a background in Electrical Engineering.

Share on: LinkedIn, Twitter, Google+