in_sdl.c: Fix control-character handling.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@736 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
svdijk 2012-09-27 10:41:07 +00:00
parent d06c0ed773
commit 36c6812a5f

View file

@ -373,7 +373,13 @@ void IN_SendKeyEvents (void)
break; /* S.A: fixes QNX weirdness */ break; /* S.A: fixes QNX weirdness */
#endif /* __QNX__ */ #endif /* __QNX__ */
if ((event.key.keysym.unicode & 0xFF80) == 0) if ((event.key.keysym.unicode & 0xFF80) == 0)
{
sym = event.key.keysym.unicode & 0x7F; sym = event.key.keysym.unicode & 0x7F;
if (sym > 0 && sym < 32 && modstate & KMOD_CTRL)
if (modstate & KMOD_SHIFT)
sym += 64;
else sym += 96;
}
/* else: it's an international character */ /* else: it's an international character */
} }
/* printf("You pressed %s (%d) (%c)\n", SDL_GetKeyName(sym), sym, sym);*/ /* printf("You pressed %s (%d) (%c)\n", SDL_GetKeyName(sym), sym, sym);*/