Source/ThunderBeast/QuakeToonProto1/client/keys.c
int Key_StringToKeynum (char *str)
{
	keyname_t	*kn;
	
	if (!str || !str[0])
		return -1;
	if (!str[1])
		return str[0];

	for (kn=keynames ; kn->name ; kn++)
	{
		if (!Q_strcasecmp(str,kn->name))
			return kn->keynum;
	}
	return -1;
}
/*
===================
Key_StringToKeynum

Returns a key number to be used to index keybindings[] by looking at
the given string.  Single ascii characters return themselves, while
the K_* names are matched up.
===================
*/
Key_StringToKeynum
Returns a key number to be used to index keybindings[] by looking at
the given string.  Single ascii characters return themselves, while
the K_* names are matched up.
Key_StringToKeynum Returns a key number to be used to index keybindings [] by looking at the given string . Single ascii characters return themselves while the K_ * names are matched up .
int Key_StringToKeynum (char *str)
{
	keyname_t	*kn;
	if (!str || !str[0])
		return -1;
	if (!str[1])
		return str[0];
	for (kn=keynames ; kn->name ; kn++)
	{
		if (!Q_strcasecmp(str,kn->name))
			return kn->keynum;
	}
	return -1;
}
int Key_StringToKeynum ( char * str ) { keyname_t * kn ; if ( ! str || ! str [ 0 ] ) return -1 ; if ( ! str [ 1 ] ) return str [ 0 ] ; for ( kn = keynames ; kn -> name ; kn ++ ) { if ( ! Q_strcasecmp ( str , kn -> name ) ) return kn -> keynum ; } return -1 ; }
Key_StringToKeynum
Returns a key number to be used to index keybindings[] by looking at
the given string.
Key_StringToKeynum Returns a key number to be used to index keybindings [] by looking at the given string .