From f275eb5f9ad0d4b2bc6db70ef55b55e5903334db Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 9 Aug 2025 22:22:14 +0200 Subject: [PATCH] test: disable sdl textinput when not using native keyboard layout this may fix issues on newer sdl2/-compat versions with dead keys on non us layouts --- src/sdl/i_video.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 798be9593..03de99d4e 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -117,6 +117,10 @@ boolean highcolor = false; static void KeyboardLayout_OnChange(void) { + if (cv_keyboardlayout.value == 2) + SDL_StartTextInput(); + else + SDL_StopTextInput(); HU_Shiftform(); } @@ -367,7 +371,9 @@ static INT32 GetTypedChar(SDL_Keysym keysym) if (SDL_PeepEvents(&next_event, 1, SDL_PEEKEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT) == 1 && next_event.type == SDL_TEXTINPUT) { if (next_event.text.text[1] == '\0') // limit to ASCII + { return next_event.text.text[0]; + } } }