Capturing barcode data

I need to be able to capture barcode scan into code without having focus in an input box.

Can datawedge be used for that?