Detect data scanned by barcode readers
let Scanner = require('barcode-scanner')
let scanner = new Scanner()
scanner.on('scanned', (str, type)=>{
console.log(`Scanned ${type}: ${str}`)
})
Begins and continues listening for scans. This is activated upon initialization
Stops listening for scans.
Tested on the following
- Chrome Desktop (other modern browsers should work too)
- Archer@ Enterprise Handheld Mobile Terminal
- IOT Handheld Terminal
- Android Devices with Bluetooth Scanner (keyboard wedge entry)
MIT © Kevin Jantzer – Blackstone Publishing