(This is the legacy documentation for stable SDL2, the current stable version; SDL3 is the current development version.)
Query the window which currently has keyboard focus.
SDL_Window * SDL_GetKeyboardFocus(void);
Returns the window with keyboard focus.
This function is available since SDL 2.0.0.