[client] Block binding of the escape key

Id's binding of escape to togglemenu interfered with the hard-coding
(want escape to togglemenu (or console as a fallback) no matter what).
This idea was part of mercury's original design, too.
This commit is contained in:
Bill Currie 2021-11-28 23:22:11 +09:00
parent b0447c1cf1
commit f36fa23666
2 changed files with 13 additions and 1 deletions

View file

@ -30,6 +30,14 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/dstring.h" #include "QF/dstring.h"
@ -63,6 +71,10 @@ cl_bind_f (void)
return; return;
} }
if (strcasecmp (Cmd_Argv (1), "ESCAPE") == 0) {
return;
}
if (!(key = OK_TranslateKeyName (Cmd_Argv (1)))) { if (!(key = OK_TranslateKeyName (Cmd_Argv (1)))) {
return; return;
} }

View file

@ -59,7 +59,7 @@ typedef struct {
} old_keyname_t; } old_keyname_t;
old_keyname_t old_keynames[] = { old_keyname_t old_keynames[] = {
{"ESCAPE", "key button 0x01"}, //{"ESCAPE", "key button 0x01"}, binding not allowed
{"1", "key button 0x02"}, {"1", "key button 0x02"},
{"2", "key button 0x03"}, {"2", "key button 0x03"},
{"3", "key button 0x04"}, {"3", "key button 0x04"},