I am pretty sure this runs counter to the HIG and keyboard input design. Especially since the various software keyboards are going to have a wide variety of dimensions on the screen. I mean, look at the size of one of the emoji keyboards vs. "standard" keyboards vs. some dictation enabled minimal keyboard.
Especially since that hardware keyboard could be anything from a small 50-odd key keyboard, a Braille keyboard, or anything else (not getting in to stuff like non-English keyboard variationa.)
But what "UI Actions" did you want to take for a software keyboard vs. a hardware keyboard? There are notifications you can get for when the keyboard overlay on the screen appears and changes size.
iPad has supported physical keyboards since it was first released. Support includes a full range of wireless Bluetooth keyboards and most any USB keyboard.
And while the iPad doesn't have a USB port, Apple came up with the Camera Connection Kit, which turned the original 30-pin connector into a USB port - when Apple moved from the old 30-pin connector to the thinner Lightning connector, they changed the name of the Camera Connection Kit to the Lightning to USB Camera Adapter which uses the 'camera' adapter to convert the Lightning connection into a USB port.
It's on the dev to round up the associated hardware and test for their own purposes.
>perform certain UI actions depending on the keyboard state
If you can explain those, perhaps someone can provide certain suggestions. If this is about accented characters, note that when using Apple's Smart Keyboard on iPP, as an example, there is a keyboard sequence involving the down arrow that toggles between it and the onscreen keyboard.
I have the exact same question. In my case I'd like the UI to adopt if e.g. a user with limited physical and/or motor skills navigating the iOS app with a hardware keyboard (through the accessiblity feature) uses my app. Right now I have a list overlaying a map (similar to iOS' Maps app) and navigating that list with a keyboards doesn't work well.
I'd like to be able to detect if a user navigates my app with a hardware keyboard and make that overlaying list fullscreen in that case.
Any ideas on how to accomplish the hardware keyboard detection?