libsdl-org / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
8.72k stars 1.64k forks source link

Text input doesn't work in iOS simulator #9624

Open Susko3 opened 2 months ago

Susko3 commented 2 months ago

SDL_EVENT_KEY_DOWN and SDL_EVENT_KEY_UP events are sent just fine, but no SDL_EVENT_TEXT_INPUT events are sent. Attached are application logs with SDL_HINT_EVENT_LOGGING enabled. Typing starts at the first SDL_EVENT_KEY_DOWN.

log3.txt

I don't have iOS simulator setup, so please ping the OP if you need additional info.

slouken commented 2 months ago

Is SDL_StartTextInput() being called?

Susko3 commented 2 months ago

Is SDL_StartTextInput() being called?

It must be. It's working fine for all other platforms. I've not personally tested iOS on a real device, but others have and there are no reports of text input not working.

Please check if you're able to reproduce the issue.

slouken commented 2 months ago

What are the repro steps, assuming I've never used osu? :)

Susko3 commented 2 months ago

I was hoping you (or someone on the team) might be able to confirm whether or not text input works in the SDL tests on iOS simulator.

The latest release of osu! for iOS can be downloaded from https://github.com/ppy/osu/releases/download/2024.412.1/osu.iOS.ipa. It still uses SDL2, so it might not be of much use. (The original issue is about SDL3.)

Once opened, you can dismiss the first run setup overlay, you can then tap on the osu! cookie and go to settings, where you can find a search text box, tapping on it activates it and calls SDL_StartTextInput().

You can verify that keyboard events work by pressing Ctrl-O, which should toggle settings.

drkoll commented 1 day ago

Following up on this issue as I am experiencing the same behavior described in the original post by @Susko3 on an iPad Pro 4th Gen with the latest version (2024.625.2) of Osu and a Logitech Combo Touch keyboard.

Symptoms

Temporary Workaround

  1. Disconnect Keyboard:
    • Disconnect the physical keyboard from the Smart Connector port of the iPad.
    • The onscreen keyboard will appear.
  2. Use Onscreen Keyboard:
    • Use the onscreen keyboard to input any text into any text field (tested with username/password boxes and settings search bar).
  3. Reconnect Keyboard:
    • Reconnect the physical keyboard to the Smart Connector port.
    • The hardware keyboard will then function properly for text input.

Additional Information

Steps to Reproduce

  1. Connect a Logitech Combo Touch keyboard to an iPad Pro.
  2. Open Osu.ipa
  3. Attempt to type in any text field.
  4. Follow the temporary workaround steps if needed.

I do not have any log files but I can attempt to get some if they would be helpful. All I know so far is the stuff I mention above. I can also attempt to side-load different versions of Osu to see if the behavior is present in those. I am new to this particular game (which I believe the SDL project is not directly connected to,) and all of this is quite new to me. Thanks in advance for any light you can shine on this issue!

drkoll commented 1 day ago

I have recorded a video demonstrating the behavior in case it is helpful to you @slouken https://github.com/libsdl-org/SDL/assets/128939759/f677f364-5b81-4fad-b1c7-6e1aaad2a103