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
1 changed files with 6 additions and 0 deletions

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);*/