Page 1 of 1

detecting if an external keyboard is in use on an iPad

Posted: Thu Sep 07, 2017 2:26 pm
by dave.kilroy
Hi all

On an iPhone, item 4 of 'the effective working screenrect' when called in an 'inputTextChanged handler lets me know if an external keyboard is attached (another way is to check if 'keyboardActivated' fires - doesn't fire if an external keyboard is connected)

However on an iPad with a ble connected keyboard 'keyboardActivated' fires and a check of 'the effective working screenrect' shows a reduced rect (so exactly the same as if no keyboard is attached) - in the 'inputTextChanged' handler the 'the effective working screenrect' reports also reports a reduced rect, again just as if no keyboard is attached.

I think the issue is that on an iPad when an external keyboard is attached (at least on iOS 10.3) a little bit of the on-screen keyboard is displayed at the bottom of the screen that shows suggested word completions, undo button etc. I'm guessing that this slight change in the rect of the on-screen keyboard (or whatever the control is) is enough to flummox LiveCode's 'the effective working screenrect'

Can anyone else confirm this? If so I'll then make a feature request so we can get 'the effective working screenrect' working again to report external keyboards

Kind regards