Ability to disable IME while still getting TextInput events

I think it might be useful if there was a way in SDL to explicitly
enable / disable IMEs separately from the SDL_StartTextInput /
SDL_StopTextInput functions.

For example, web browsers tend to disable the IME when a password text
box is selected, so that it isn’t accidentally displayed on-screen or
sent to an IME that learns from past inputs.

If someone wanted to do something similar with SDL they’d have to
disable TextInput events entirely and work out the text from the raw key
press events.

This could maybe be implemented as an SDL_Hint, called something like
SDL_IME_CONTROL which would have values like DEFAULT, BYPASS and maybe
more depending on the specific IME’s capabilities.

I’m happy to implement this for the IBus IME stuff in SDL if people
think it’s a good idea. I’m uncertain if the SDL_Hint interface a good
choice for this though - should it be a separate API entirely?

Any feedback / comments are welcome.

Alex.

I would say that making a new function would be better. Hints are
meant mostly for global settings that remain constant for the duration
of the program (or changes very rarely) and which may be reasonably
expected to be a good candidate to let the user override, but this is
definitely neither of those.