Skip to content

Commit

Permalink
Fixed Shift combinations with locales.
Browse files Browse the repository at this point in the history
  • Loading branch information
najlkin committed Aug 14, 2024
1 parent 2b8a8ec commit 533908a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/sdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,9 @@ void SdlWindow::keyDownEvent(SDL_Keysym& ks)
// handle key translation due to Shift or CapsLock, so we leave such events
// to be processed there.
// Note: the same condition has to be used in signalKeyDown().
if ((ks.sym >= 32 && ks.sym < 127) &&
(ks.mod & (KMOD_CTRL | KMOD_ALT | KMOD_GUI)) == 0)
const char *scan_name = SDL_GetScancodeName(ks.scancode);
if ((scan_name[0] >= 32 && scan_name[0] < 127) && scan_name[1] == '\0'
&& (ks.mod & (KMOD_CTRL | KMOD_ALT | KMOD_GUI)) == 0)
{
lastKeyDownProcessed = false;
return;
Expand Down

0 comments on commit 533908a

Please sign in to comment.