git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3581
d7cf8633-e32d-0410-b094-
e92efae38249
*/
#include "quakedef.h"
+#include <ctype.h>
/*
if (!str || !str[0])
return -1;
if (!str[1])
- return str[0];
+ return tolower(str[0]);
for (kn=keynames ; kn->name ; kn++)
if (!strcasecmp(str,kn->name))
case XK_KP_Divide: key = K_KP_SLASH; break;
default:
+ if (keysym < 32 && keysym > 126)
+ break;
+
+ if (keysym >= 'A' && keysym <= 'Z')
+ key = keysym - 'A' + 'a';
+ else
+ key = keysym;
+
break;
}