I have a circumstance where a bluetooth barcode scanner is acting as a hardware keyboard in an Xamarin Forms application. The barcodes are encoded as such to contain a bit of information that needs to be parsed into different fields.
Unfortunately, some of the data is a tab character. iOS receives this hardware event in my app and once the tab pumps through, the next input field is focused and the barcode data continues to dump into that (the barcode scanner reads the data through "sequentially", as if to simulate you were typing it in).
At any rate; I'm having a heck of a time intercepting the "tab" character in an Entry
(UITextView
) in Xamarin/iOS.
I've set up an extension on Entry
and associated a custom renderer with it (MyRenderer : EntryRenderer
). Searching suggests that using Control.ShouldChangeTextInRange
should work for character remapping, but the tab event happens on a different level it appears.
How can I stop a hardware keyboard "Tab" character in iOS from focusing onto the next field?