Separate bluetooth keyboard and bluetooth scanner inputs

Hi,

I have an iOS app where bluetooth scanner and bluetooth keyboard both should work simultaneously.

I have used 'pressesBegan' method to fetch the characters which are coming from the bluetooth keyboard. This method is fetching all the bluetooth keyboard inputs correctly. But this method is also called when the characters are coming from the bluetooth scanner.

In the 'pressesBegan' method, I have to separate the inputs which are coming from the bluetooth keyboard and are coming from bluetooth scanner. They both have some different use in the app. I have already tried with the fetching speed of the characters, but no luck in case of high speed typing. So characters fetching speed will not work in our case.

Is there any way to separate the inputs based on some other factorials? Or any other info in the 'pressesBegan' method which can separate the input that it is coming from scanner or is coming from keyboard.

Any suggestion regarding this will be helpful.

Thanks in advance.

Separate bluetooth keyboard and bluetooth scanner inputs
 
 
Q