diff --git a/src/g_input.c b/src/g_input.c index 5b47ccf0..d685b8b0 100644 --- a/src/g_input.c +++ b/src/g_input.c @@ -1208,6 +1208,7 @@ static const char *gamecontrolname[num_gamecontrols] = "scores", "console", "pause", + "systemmenu", "custom1", "custom2", "custom3", diff --git a/src/g_input.h b/src/g_input.h index 7e49fff3..6bbadf3e 100644 --- a/src/g_input.h +++ b/src/g_input.h @@ -114,6 +114,7 @@ typedef enum gc_scores, gc_console, gc_pause, + gc_systemmenu, gc_custom1, // Lua scriptable gc_custom2, // Lua scriptable gc_custom3, // Lua scriptable diff --git a/src/m_menu.c b/src/m_menu.c index f7fe1e84..e697b915 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1092,12 +1092,13 @@ static menuitem_t OP_MoveControlsMenu[] = {IT_CONTROL, NULL, "Talk key", M_ChangeControl, gc_talkkey }, //{IT_CONTROL, NULL, "Team-Talk key", M_ChangeControl, gc_teamkey }, {IT_CONTROL, NULL, "Rankings/Scores", M_ChangeControl, gc_scores }, + {IT_CONTROL, NULL, "Open/Close Menu (ESC)", M_ChangeControl, gc_systemmenu}, {IT_CONTROL, NULL, "Pause", M_ChangeControl, gc_pause }, {IT_CONTROL, NULL, "Console", M_ChangeControl, gc_console }, - {IT_SUBMENU | IT_STRING, NULL, "Gamepad Options...", &OP_Joystick1Def, 112}, - {IT_SUBMENU | IT_STRING, NULL, "Spectator Controls...", &OP_SpectateControlsDef, 120}, - {IT_SUBMENU | IT_STRING, NULL, "Custom Lua Actions...", &OP_CustomControlsDef, 128}, + {IT_SUBMENU | IT_STRING, NULL, "Gamepad Options...", &OP_Joystick1Def, 120}, + {IT_SUBMENU | IT_STRING, NULL, "Spectator Controls...", &OP_SpectateControlsDef, 128}, + {IT_SUBMENU | IT_STRING, NULL, "Custom Lua Actions...", &OP_CustomControlsDef, 136}, }; static menuitem_t OP_SpectateControlsMenu[] = @@ -2467,11 +2468,14 @@ boolean M_Responder(event_t *ev) if (ch == -1) return false; + else if (ch == gamecontrol[gc_systemmenu][0]) // allow remappable ESC key + ch = KEY_ESCAPE; // F-Keys if (!menuactive) { noFurtherInput = true; + switch (ch) { case KEY_F1: // Help key