Find if any bluetooth scanner is attached to mobile

I have a usecase to detect only bluetooth scanners or keyboard attached to mobile devices , i have seen few plugins which gives the list of devices attached to Mobile nothing specifc if it’s a barcode scanner or a keyboard, Anyway we can detect that?