in_sdl.c: Fix control-character handling.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@736 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Sander van Dijk 2012-09-27 10:41:07 +00:00
parent 2f9fcd69b7
commit c745a202af

View file

@ -373,7 +373,13 @@ void IN_SendKeyEvents (void)
break; /* S.A: fixes QNX weirdness */
#endif /* __QNX__ */
if ((event.key.keysym.unicode & 0xFF80) == 0)
{
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 */
}
/* printf("You pressed %s (%d) (%c)\n", SDL_GetKeyName(sym), sym, sym);*/