-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Motivation
During a text entry when an IME candidate list is invoked, user input may occur which still keeps the textbox in focus but interrupts the current candidate text selection (i.e. clicking to a different word in the same textbox). Ideally this should result in the candidate window to be dismissed but also keep the state for SDL_StartTextInput
such that new TEXTINPUT
events can be receieved.
I find that calling SDL_StopTextInput
followed by SDL_StartTextInput
not really a full solution to these sort of user interactions, especially in the case of screen keyboards which will close then immedialely reopen resulting in poor user experience.
This proposal was brought about by attempting to integrate SDL IME text input to the osu-framework in this PR: ppy/osu-framework#4709
Proposed Functionality
Function name
SDL_ResetTextInput
When text input is stopped, this function should
- Have no effect
When text input is started, this function should
- Dismiss any open IME candidate window
- Reset the platform IME state to clear candidate input
- Send an empty
SDL_TEXTEDITING
event
Feedback and implementation
If there is any feedback to this proposal that would be great. I would be interested in implementing this myself once appropriate feedback has been received.