diff --git a/src/g_input.c b/src/g_input.c index b004384c..4f87332c 100644 --- a/src/g_input.c +++ b/src/g_input.c @@ -990,6 +990,7 @@ static const char *gamecontrolname[num_gamecontrols] = "jump", "console", "pause", + "systemmenu", "custom1", "custom2", "custom3", diff --git a/src/g_input.h b/src/g_input.h index d6533932..63350482 100644 --- a/src/g_input.h +++ b/src/g_input.h @@ -118,6 +118,7 @@ typedef enum gc_jump, 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 ea93d1e2..f438508a 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1077,6 +1077,8 @@ static menuitem_t OP_MiscControlsMenu[] = {IT_CALL | IT_STRING2, NULL, "Custom Action 2", M_ChangeControl, gc_custom2 }, {IT_CALL | IT_STRING2, NULL, "Custom Action 3", M_ChangeControl, gc_custom3 }, + {IT_CALL | IT_STRING2, NULL, "System Menu (ESC)",M_ChangeControl, gc_systemmenu }, + {IT_CALL | IT_STRING2, NULL, "Pause", M_ChangeControl, gc_pause }, {IT_CALL | IT_STRING2, NULL, "Console", M_ChangeControl, gc_console }, }; @@ -2176,11 +2178,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