Is this possible?
I don't know IME_HeightChanged, can you explain a little bit how it works?
I think (
@agraham correct me if I'm wrong) that if the user has an HID barcode reader attached then the soft keyboard will not be displayed so no heightchanged event will be fired. But, if they display the soft keyboard then it will be (so you can set a "user-typed-something" flag).
This does mean that if they show the keyboard, close it then scan you will still think it was typed and not scanned. If your barcode reader supports SPP mode you could use an asyncstreams class to monitor the device for input and then send it your activity.
I've written an apps that do just that, they monitor for an SPP-mode reader input and collect everything up to a CR character, then send everything up to that CR to the current activity in a "Barcode_Reader" event.
If your reader only has an HID option, then your method of scanning both places would be best, just prioritize whichever table you expect to be most common.