how to diference the same string if this was written or scanned (bar code)
===

I am programming on C#, for Handhelds, well problem is next
when a client is visited user for look for it, he keys the client's number.
but now it is going to be scanned, 
for example with client 123
normally i go and i write 123 for look for this client and now i press "sale" for start a sale.(it is with a button cuz a client has plus option for example questionary for ask it questions)

now this same number would be scanned and in that moment, automatically it must to open the sale.

is there a event when a bar code is read?
or how can i to difference if this was scanned or keyed
my real question how to know if a string as scanned?




