ScannerKeystrokeObserver is a class to automatically detect entries from a hardware device that generates keystrokes (like a barcode scanner).
Include a reference to the ScannerKeystrokeObserver.js script file and the following code in a script block in the head of your web page.
new ScannerKeystrokeObserver({
onRead: function(v) {
$('txtGlobal').set('value', v).highlight();
}
});