Sounds somehow similar to this issuethis issue, so I'd try this solutionthis solution : if I understand correctly your problem, the barcode scanner should appear as a slave pointer of "Virtual core keyboard" when you do
xinput --list
Then maybe getting its ID and forcing it to float could help :
xinput float <id>