diff --git a/src/i_video.h b/src/i_video.h index 602522871..830583822 100644 --- a/src/i_video.h +++ b/src/i_video.h @@ -137,4 +137,6 @@ void I_EndRead(void); UINT32 I_GetRefreshRate(void); +boolean I_UseNativeKeyboard(void); + #endif diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 62f7bfe46..f5e84cc88 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -413,11 +413,14 @@ static INT32 GetTypedChar(SDL_Scancode code, SDL_Keysym *sym) if (SDL_PollEvent(&next_event) && next_event.type == SDL_TEXTINPUT) { - if (strlen(next_event.text.text) == 1) - return next_event.text.text[0]; + if (next_event.text.text[1] == '\0') // limit to ASCII + { + if (strlen(next_event.text.text) == 1) + return next_event.text.text[0]; + } } - return Impl_SDL_Scancode_To_Keycode(code); + return Impl_SDL_Scancode_To_Keycode(code); //fallback } static INT32 Impl_SDL_Keysym_To_Keycode(SDL_Keysym keysym)