4 ms·
SDL2, which is an abstraction intended for games (gives you a window, sets up OpenGL and handles input events, but leaves the drawing to you), has a very simple
by TazeTSchnitzel 3y ago
SDL2, which is an abstraction intended for games (gives you a window, sets up OpenGL and handles input events, but leaves the drawing to you), has a very simple text input API that can handle IMEs: https://wiki.libsdl.org/SDL2/SDL_StartTextInput https://wiki.libsdl.org/SDL2/SDL_StartTextInput + https://wiki.libsdl.org/SDL2/SDL_SetTextInputRect https://wiki.libsdl.org/SDL2/SDL_SetTextInputRect. But the trade-off is that you can't write a text editor with this. It just lets the user type text using the OS's text field or similar and the app is not in control while they do so.