mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
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:
parent
d06c0ed773
commit
36c6812a5f
1 changed files with 6 additions and 0 deletions
|
@ -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);*/
|
||||||
|
|
Loading…
Reference in a new issue