I think its working same like keyboard. Either you type the code manually or you can read it from scanner. With the help of keyboard you can able to type anything on the cursor position, on the same way the barcode-scanner is also working. Just like a copy and paste the scanner copies the data from physical device and paste it into your corrent cursor position. There is no separate program codings needed for this job.