14 setkeydest( KEY_MENU );
20 // make sure that we have the input focus
21 setkeydest( KEY_MENU );
23 if( getkeydest() != KEY_MENU ) {
31 setkeydest( KEY_GAME );
34 void( string pKey ) Key_Unbind =
36 cmd( strcat( "unbind ", pKey, "\n" ) );
39 string( float pKey ) Key_GetName =
41 return keynumtostring( pKey );
44 float( string pKey ) Key_GetNum =
46 return stringtokeynum( pKey );
49 string( string pCommand ) Key_GetBindList =
51 return String_Zone( findkeysforcommand( pCommand ) );
54 void(string pKey, string pCommand) Key_Bind =
56 cmd( strcat( "bind \"", pKey, "\" \"", pCommand, "\"\n" ) );
59 void(float pNum, string pCommand) Key_LimitBinds =
61 local string lAltlist;
66 lAltlist = Key_GetBindList( pCommand );
67 lMaxnum = Util_GetAltStringCount( lAltlist );
69 for( lCounter = 0 ; lCounter < lMaxnum ; lCounter = lCounter + 1 ) {
70 lValue = stof( String_Normal( Util_GetAltStringItem( lAltlist, lCounter ) ) );
74 if( lCounter >= pNum )
75 Key_Unbind( Key_GetName( lValue ) );
78 String_Free( lAltlist );