Read data from scanner and pipe it to focused input field



is it possible to pipe data into an focused input?

I have an app which scans ids of cards. My current solution gives data back to a resolve of a promise. My dream solution is a standalone lib fro scanning which pipes the input to the keyboard stream and when an inout field is focused, he will pipe the data in the input field.

Is this possible?