From f36fa236666dca9122f904b5944d5e2d37bb0cec Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 28 Nov 2021 23:22:11 +0900 Subject: [PATCH] [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. --- libs/client/cl_input.c | 12 ++++++++++++ libs/client/old_keys.c | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/libs/client/cl_input.c b/libs/client/cl_input.c index 75564c559..80ea95ff9 100644 --- a/libs/client/cl_input.c +++ b/libs/client/cl_input.c @@ -30,6 +30,14 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + +#ifdef HAVE_STRING_H +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif + #include "QF/cmd.h" #include "QF/cvar.h" #include "QF/dstring.h" @@ -63,6 +71,10 @@ cl_bind_f (void) return; } + if (strcasecmp (Cmd_Argv (1), "ESCAPE") == 0) { + return; + } + if (!(key = OK_TranslateKeyName (Cmd_Argv (1)))) { return; } diff --git a/libs/client/old_keys.c b/libs/client/old_keys.c index 69b008c83..2fea7d733 100644 --- a/libs/client/old_keys.c +++ b/libs/client/old_keys.c @@ -59,7 +59,7 @@ typedef struct { } old_keyname_t; old_keyname_t old_keynames[] = { - {"ESCAPE", "key button 0x01"}, + //{"ESCAPE", "key button 0x01"}, binding not allowed {"1", "key button 0x02"}, {"2", "key button 0x03"}, {"3", "key button 0x04"},