Identify reading end using Barcode Scanner

While reading the text from the barcode scanner if you want to check if the reading is end or not. When reading has been completed from barcode scanner it will append the enter key in text and if you want to extract text automatically while reading completed then you can check using below javascript code snippets.

// pass event as the object from where you are reading text through barcode.
function getScanneText(event)
{
if(event.e.keyCode == 13) // ascii value of enter key
{
// do something here.
}
}

call above function on keyup event of textbox and check, if enter key is pressed or not.

Comments

Popular posts from this blog

Create Short URL using C#