detecting if an external keyboard is in use on an iPad

Getting into LiveCode for iOS? Ask your questions here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

detecting if an external keyboard is in use on an iPad

Postby 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

"...this is not the code you are looking for..."
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 824
Joined: Wed Jun 24, 2009 1:17 pm
Location: Plymouth, UK

Return to iOS Deployment

Who is online

Users browsing this forum: Google [Bot] and 1 guest