SDL2 iOS keyboard demo isn't working?


#1

In my own program, I am trying to get the keyboard to appear on the screen. It works fine on Android, and nothing I can find indicates I need to do something extra for iOS to do so. Calling SDL_StartTextInput() is supposed to open the on-screen keyboard, but it is not doing so in the iOS simulator.

Then I found that the SDL2 iOS XCode project has demos, one of which demonstrates the keyboard, but it does not seem to be functioning either. The fireworks demo does work, but the keyboard demo shows what appears to be a large white cursor with a black outline over a screen filled with a blue-ish purple background. No clicks/touches seem to bring the keyboard up.

I’m using Mac OS High Sierra (10.13.6) with Xcode 10.1 and SDL2 2.0.8.

Does anyone know if this functionality is currently broken, or if it is perhaps a matter of configuring the project in Xcode to support the keyboard? My experience so far has been to expect that Xcode needs something I wouldn’t think of to function.


#2

Of course, after trying to figure this out, as soon as I post it, I find an answer by poking around in the Simulator’s menus.

I went to Hardware > Keyboard and unchecked Use Hardware Keyboard.

Now the onscreen keyboard shows up as expected. Hopefully this post helps someone who runs into the same issue in the future.