detecting if an external keyboard is in use on an iPad

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Location: Plymouth, UK
Contact:

detecting if an external keyboard is in use on an iPad

Post by dave.kilroy » Thu Sep 07, 2017 2:26 pm

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

Dave
"...this is not the code you are looking for..."

Post Reply

Return to “iOS Deployment”