SDL3: Enable raw keyboard on Windows
Related:
- https://github.com/ppy/osu-framework/issues/6141
- https://github.com/libsdl-org/SDL/issues/9409
With https://github.com/ppy/osu-framework/pull/6506, this will handle keyboard events on a dedicated thread to bypass the usual SDL event flow, leading to lower latency and immunity from main thread lag (we sometimes see SDL_PumpEvents() take a long time). Mouse input is already handled on this dedicated thread when relative mouse mode is enabled.
~~This PR is blocked as it breaks disabling the windows key during gameplay in osu!. Raw keyboard input will bypass the hook that is supposed to disable the windows key. I found some plausible workaround for this, but they are very hacky and might increase latency.~~
Enabling raw keyboard may lead to timing issues wrt TextBox text input & related handling. This PR needs to be tested to check for IME regressions.
Keep in mind that the hint can be toggled while the game is running. So if some issue is a deal-breaker, we can just toggle the hint off as needed. Example: if someone has a gaming keyboard that can disable the windows key in hardware, they don't need our software solution, so they would only benefit from raw keyboard.
https://wiki.libsdl.org/SDL3/SDL_HINT_WINDOWS_RAW_KEYBOARD
Unblocked as we have a fix for disabling the windows key during gameplay in osu!: https://github.com/ppy/osu/pull/35727.