jquery-scanner-detection

jquery-scanner-detection is a small plugin to detect when user use a scanner (barcode, QR Code...) instead of a keyboard, and call specific callbacks.

Install

bower install jQuery-Scanner-Detection

How use it

To initialize the detection, 2 ways:

$(selector).scannerDetection(); // Initialize with default options $(selector).scannerDetection({...}); // Initialize with an object that contains options $(selector).scannerDetection(function(){...}); // Initialize with a function that is onComplete callback

To simulate a scanning after initialisation:

$(selector).scannerDetection('scanned string');

To disable the detection (deinitialize):

$(selector).scannerDetection(false)

Comentários