diff --git a/client/src/app.c b/client/src/app.c index 96ae9c0e..59fcf718 100644 --- a/client/src/app.c +++ b/client/src/app.c @@ -280,18 +280,21 @@ void app_handleWheelMotion(double motion) void app_handleKeyPress(int sc) { - if (sc == g_params.escapeKey && !g_state.escapeActive) + if (!g_state.overlayInput || !g_state.io->WantCaptureKeyboard) { - g_state.escapeActive = true; - g_state.escapeTime = microtime(); - g_state.escapeAction = -1; - return; - } + if (sc == g_params.escapeKey && !g_state.escapeActive) + { + g_state.escapeActive = true; + g_state.escapeTime = microtime(); + g_state.escapeAction = -1; + return; + } - if (g_state.escapeActive) - { - g_state.escapeAction = sc; - return; + if (g_state.escapeActive) + { + g_state.escapeAction = sc; + return; + } } if (g_state.overlayInput)