How to restrict textfield to take input from virtual keyboard only not from any other connected Bluetooth Device (scanner device)?

I am working on an iPad application which uses Henex HC-3208R wireless bar code scanner.

While doing scanning the scanner reads the code from the QR code or barcode and copies the code in the textfield where focus is there which need to be restricted. If by mistakenly the focus goes to any textfield and you trigger the scanning button in device at the same time then it reads the code and copies it to the textfield.

I also tried to distinguish between the text inputs from the virtual keyboard and bluetooth input device so that I can block the text coming from bluetooth scanner device but there is no changes in the textfield delegates, it behaves the same.

If we can get to know the source of the key strike when focus is already there in a textfield, that will be much helpful.

PS: I am connecting the scanner as using HID Profile and it is treated as a bluetooth keyboard by iPad.This is expected as device treats bar code scanner as bluetooth keyboard, but we can forcefully open the virtual keyboard on long pressing the arrow-up icon in keyboard task bar which is shown everytime.

Please let me know if it is possible or any other suggestion which I can try.

Thanks in advance.

How to restrict textfield to take input from virtual keyboard only not from any other connected Bluetooth Device (scanner device)?
 
 
Q